{"version":3,"file":"Image_PromptSelector.BHIP_qpm.mjs","names":["React.useState","Check"],"sources":["https:/framerusercontent.com/modules/lnVCnxXGgmeLSkNqSVqR/VPudadnqitvk5yqqkguI/Image_PromptSelector.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{motion}from\"framer-motion\";import{Check}from\"lucide-react\";import{addPropertyControls,ControlType}from\"framer\";const cardVariants={hover:{backgroundColor:\"#F5F5F5\",boxShadow:\"0 6px 14px rgba(0,0,0,0.08)\"}};// Mobile detection hook\nfunction useIsMobile(breakpoint=768){const[isMobile,setIsMobile]=React.useState(false);React.useEffect(()=>{const check=()=>setIsMobile(window.innerWidth<=breakpoint);check();window.addEventListener(\"resize\",check);return()=>window.removeEventListener(\"resize\",check);},[breakpoint]);return isMobile;}export default function SelectionGrid(props){const{options,columns,gap,defaultSelected,checkColor,hoverEffect}=props;const[selectedId,setSelectedId]=React.useState(defaultSelected);const isMobile=useIsMobile();return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{display:\"grid\",gridTemplateColumns:`repeat(${columns}, minmax(0, 1fr))`,gap:gap},children:options.map((item,index)=>{const id=index+1;const isActive=id===selectedId;return /*#__PURE__*/_jsxs(motion.div,{layout:true,variants:hoverEffect?cardVariants:undefined,whileHover:hoverEffect?\"hover\":undefined,transition:{duration:.2},onClick:()=>setSelectedId(id),style:{position:\"relative\",display:\"flex\",flexDirection:isMobile?\"column\":\"row\",alignItems:isMobile?\"center\":\"center\",gap:8,padding:\"16px\",border:\"1px solid #E5E7EB\",borderRadius:10,cursor:\"pointer\",boxSizing:\"border-box\",background:\"#FFFFFF\",textAlign:isMobile?\"center\":\"left\"},children:[isActive&&isMobile&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:8,right:8},children:/*#__PURE__*/_jsx(Check,{size:20,color:checkColor})}),/*#__PURE__*/_jsx(\"img\",{src:item.img,alt:item.title,style:{width:40,height:40,borderRadius:8,objectFit:\"cover\",flexShrink:0}}),/*#__PURE__*/_jsx(\"span\",{style:{flex:isMobile?\"unset\":1,minWidth:0,fontSize:12,fontWeight:500,color:\"#111827\"},children:item.title}),isActive&&!isMobile&&/*#__PURE__*/_jsx(Check,{size:20,color:checkColor,style:{flexShrink:0}})]},id);})})});}SelectionGrid.defaultProps={columns:2,gap:12,defaultSelected:1,checkColor:\"#4F46E5\",hoverEffect:true,options:[{title:\"Cinematic Short Scene\",img:\"https://chat.ai-pro.org/assets/cinematic.png\"},{title:\"Product Commercial\",img:\"https://chat.ai-pro.org/assets/product_commercial.png\"},{title:\"Travel Reel\",img:\"https://chat.ai-pro.org/assets/travel_reel.png\"},{title:\"Social Media Skit\",img:\"https://chat.ai-pro.org/assets/social_media_kit.png\"}]};addPropertyControls(SelectionGrid,{options:{type:ControlType.Array,title:\"Options\",propertyControl:{type:ControlType.Object,controls:{title:{type:ControlType.String,title:\"Title\"},img:{type:ControlType.Image,title:\"Image\"}}}},columns:{type:ControlType.Number,title:\"Columns\",min:1,max:4,step:1},gap:{type:ControlType.Number,title:\"Gap\",min:0,max:40,step:2},defaultSelected:{type:ControlType.Number,title:\"Default Selected\",min:1,max:20,step:1},checkColor:{type:ControlType.Color,title:\"Check Color\"},hoverEffect:{type:ControlType.Boolean,title:\"Hover Effect\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SelectionGrid\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Image_PromptSelector.map"],"mappings":"uSACA,SAAS,EAAY,EAAW,IAAI,CAAC,GAAK,CAAC,EAAS,GAAaA,EAAe,GAAM,CAAsM,OAArM,MAAoB,CAAC,IAAM,MAAU,EAAY,EAAO,YAAY,EAAW,CAAiD,OAAhD,GAAO,CAAC,EAAO,iBAAiB,SAAS,EAA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