{"version":3,"file":"Prompt_Box.DoXCEdqN.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/nZ264DtjXREFnB8zWMiC/GL060lVd81EKR16rDRZf/Prompt_Box.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";export default function InputWithChips(props){const{placeholder,inputIcon,logoIcon,upgradeIcon,actionIcon,borderRadius,defaultBorderColor,typingBorderColor,inputBg,inputFont,inputTextColor,buttonBg,upgradeSectionId,buttonUrl,chips,chipAlignment,chipBg,chipBorderColor,chipBorderRadius,chipFont,chipTextColor,style}=props;const[inputValue,setInputValue]=useState(\"\");const[isMobile,setIsMobile]=useState(false);const[showUpgrade,setShowUpgrade]=useState(false);const isTyping=inputValue.trim().length>0;useEffect(()=>{const handleResize=()=>{setIsMobile(window.innerWidth<768);};handleResize();window.addEventListener(\"resize\",handleResize);return()=>window.removeEventListener(\"resize\",handleResize);},[]);const handleButtonClick=()=>{if(isTyping&&buttonUrl){const encodedPrompt=encodeURIComponent(inputValue.trim());const finalUrl=`${buttonUrl}?prompt=${encodedPrompt}&utm_source=chatbot`;window.open(finalUrl,\"_blank\");}};const handleUpgradeClick=()=>{if(upgradeSectionId){const target=document.getElementById(upgradeSectionId);if(target){target.scrollIntoView({behavior:\"smooth\"});}}};const handleChipClick=chipPrompt=>{if(buttonUrl){const encodedPrompt=encodeURIComponent(chipPrompt.trim());const finalUrl=`${buttonUrl}?prompt=${encodedPrompt}&utm_source=chip${encodedPrompt}`;window.open(finalUrl,\"_blank\");}};const justifyMap={left:\"flex-start\",center:\"center\",right:\"flex-end\"};return /*#__PURE__*/_jsxs(\"div\",{style:{...style,display:\"flex\",flexDirection:\"column\",gap:\"12px\",maxWidth:\"640px\",position:\"relative\"},children:[/*#__PURE__*/_jsxs(motion.div,{whileHover:{backgroundPosition:[\"0% 50%\",\"200% 50%\"],transition:{duration:4,repeat:Infinity,ease:\"linear\"}},style:{position:\"relative\",borderRadius:borderRadius,padding:\"1px\",background:\"linear-gradient(90deg, white, black, white)\",backgroundSize:\"400% 400%\",overflow:\"visible\"},children:[/*#__PURE__*/_jsx(motion.div,{initial:{opacity:0,y:-50},animate:{opacity:showUpgrade?1:0,y:showUpgrade?0:-50},transition:{duration:.3},style:{position:\"absolute\",bottom:\"-30px\",left:0,right:0,height:\"50px\",background:\"#222\",color:\"#999\",borderBottomLeftRadius:\"14px\",borderBottomRightRadius:\"14px\",padding:\"8px 16px\",display:\"flex\",alignItems:\"flex-end\",fontSize:\"14px\",zIndex:0},children:\"Upgrade to premium and unlock unlimited prompts and features.\"}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",zIndex:1,display:\"flex\",flexDirection:\"column\",border:`1px solid ${isTyping?typingBorderColor:defaultBorderColor}`,borderRadius:borderRadius,background:inputBg,padding:\"14px 12px\",gap:\"12px\",maxWidth:\"600px\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"flex-start\",gap:\"8px\",width:\"100%\"},children:[inputIcon&&/*#__PURE__*/_jsx(\"img\",{src:inputIcon,alt:\"icon\",style:{width:20,height:20,marginTop:4}}),/*#__PURE__*/_jsx(\"textarea\",{value:inputValue,onChange:e=>setInputValue(e.target.value),placeholder:placeholder,rows:4,style:{flex:1,border:\"none\",outline:\"none\",background:\"transparent\",...inputFont,color:inputTextColor,resize:\"none\",overflowY:\"auto\",overflowX:\"hidden\",whiteSpace:\"pre-wrap\",wordWrap:\"break-word\",minHeight:\"80px\"}})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",width:\"100%\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"16px\"},children:logoIcon&&/*#__PURE__*/_jsx(\"img\",{src:logoIcon,alt:\"logo\",style:{width:20,height:20}})}),/*#__PURE__*/_jsx(\"button\",{onClick:handleButtonClick,disabled:!isTyping,style:{background:buttonBg,border:\"none\",borderRadius:\"6px\",width:\"30px\",height:\"30px\",padding:\"8px\",cursor:isTyping?\"pointer\":\"not-allowed\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",opacity:isTyping?1:.5},children:actionIcon&&/*#__PURE__*/_jsx(\"img\",{src:actionIcon,alt:\"action icon\",style:{width:\"100%\",height:\"100%\",objectFit:\"contain\"}})})]})]})]}),/*#__PURE__*/_jsx(motion.div,{style:{display:\"flex\",gap:\"8px\",flexWrap:isMobile?\"nowrap\":\"wrap\",overflowX:isMobile?\"auto\":\"visible\",WebkitOverflowScrolling:\"touch\",justifyContent:justifyMap[chipAlignment]},animate:{y:showUpgrade?38:0},transition:{type:\"spring\",stiffness:300,damping:20},children:(chips||[]).map((chip,index)=>/*#__PURE__*/_jsxs(motion.div,{onClick:()=>handleChipClick(chip.prompt||chip.text),style:{display:\"flex\",alignItems:\"center\",flex:\"0 0 auto\",gap:\"6px\",padding:\"6px 12px\",background:chipBg,border:`1px solid ${chipBorderColor}`,borderRadius:chipBorderRadius,...chipFont,color:chipTextColor,cursor:\"pointer\",userSelect:\"none\"},whileHover:{scale:1.05},children:[chip.icon&&/*#__PURE__*/_jsx(\"img\",{src:chip.icon,alt:\"chip icon\",style:{width:16,height:16}}),/*#__PURE__*/_jsx(\"span\",{children:chip.text})]},index))})]});}InputWithChips.defaultProps={placeholder:\"What would you like to build\",inputIcon:\"\",logoIcon:\"\",upgradeIcon:\"\",actionIcon:\"\",borderRadius:12,defaultBorderColor:\"#333\",typingBorderColor:\"#09f\",inputBg:\"#121212\",inputFont:{family:\"Inter\",size:14,weight:\"Regular\",lineHeight:\"1.2em\",letterSpacing:\"0em\",textAlign:\"left\"},inputTextColor:\"#ffffff\",buttonBg:\"#f5f2e9\",upgradeSectionId:\"\",buttonUrl:\"\",chips:[{text:\"Pac Man Game\",icon:\"\",prompt:\"Build a functional Pac-Man game using React + TS\"},{text:\"Linear Clone\",icon:\"\",prompt:\"Create a modern project management app with kanban board\"},{text:\"Notion Clone\",icon:\"\",prompt:\"Build a Notion-like workspace app with collaborative editing\"}],chipAlignment:\"left\",chipBg:\"#1f1f1f\",chipBorderColor:\"#333\",chipBorderRadius:8,chipFont:{family:\"Inter\",size:13,weight:\"Regular\",lineHeight:\"1.2em\",letterSpacing:\"0em\",textAlign:\"left\"},chipTextColor:\"#ffffff\"};addPropertyControls(InputWithChips,{placeholder:{type:ControlType.String,title:\"Placeholder\"},inputIcon:{type:ControlType.Image,title:\"Input Icon\"},logoIcon:{type:ControlType.Image,title:\"Logo Icon\"},upgradeIcon:{type:ControlType.Image,title:\"Upgrade Icon\"},actionIcon:{type:ControlType.Image,title:\"Action Icon\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",min:0,max:50},defaultBorderColor:{type:ControlType.Color,title:\"Default Border Color\"},typingBorderColor:{type:ControlType.Color,title:\"Typing Border Color\"},inputBg:{type:ControlType.Color,title:\"Input Background\"},inputFont:{type:ControlType.Font,title:\"Input Font\",controls:\"extended\"},inputTextColor:{type:ControlType.Color,title:\"Input Text Color\"},buttonBg:{type:ControlType.Color,title:\"Button Bg\"},upgradeSectionId:{type:ControlType.String,title:\"Upgrade Section ID\"},buttonUrl:{type:ControlType.String,title:\"Button URL\"},chips:{type:ControlType.Array,title:\"Chips\",control:{type:ControlType.Object,controls:{text:{type:ControlType.String,title:\"Text\"},icon:{type:ControlType.Image,title:\"Icon\"},prompt:{type:ControlType.String,title:\"Prompt\"}}},maxCount:6},chipAlignment:{type:ControlType.Enum,title:\"Chip Alignment\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"]},chipBg:{type:ControlType.Color,title:\"Chip Background\"},chipBorderColor:{type:ControlType.Color,title:\"Chip Border\"},chipBorderRadius:{type:ControlType.Number,title:\"Chip Radius\",min:0,max:50},chipFont:{type:ControlType.Font,title:\"Chip Font\",controls:\"extended\"},chipTextColor:{type:ControlType.Color,title:\"Chip Text Color\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"InputWithChips\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Prompt_Box.map"],"mappings":"yYAAqL,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,cAAY,YAAU,WAAS,cAAY,aAAW,eAAa,qBAAmB,oBAAkB,UAAQ,YAAU,iBAAe,WAAS,mBAAiB,YAAU,QAAM,gBAAc,SAAO,kBAAgB,mBAAiB,WAAS,gBAAc,QAAM,CAAC,EAAW,CAAC,EAAW,EAAc,CAACA,EAAS,IAAS,CAAC,EAAS,EAAY,CAACA,EAAS,IAAY,CAAC,EAAY,EAAe,CAACA,EAAS,IAAa,EAAS,EAAW,OAAO,OAAO,EAAE,MAAc,CAAC,IAAM,MAAiB,CAAC,EAAY,EAAO,WAAW,IAAM,EAA+D,OAA9D,IAAe,EAAO,iBAAiB,SAAS,OAAwB,EAAO,oBAAoB,SAAS,EAAe,EAAC,EAAE,EAAE,IAAM,MAAsB,CAAC,GAAG,GAAU,EAAU,CAAC,IAAM,EAAc,mBAAmB,EAAW,QAAc,EAAS,GAAG,EAAU,UAAU,EAAc,qBAAqB,EAAO,KAAK,EAAS,SAAW,CAAC,EAA2K,EAAgB,GAAY,CAAC,GAAG,EAAU,CAAC,IAAM,EAAc,mBAAmB,EAAW,QAAc,EAAS,GAAG,EAAU,UAAU,EAAc,kBAAkB,IAAgB,EAAO,KAAK,EAAS,SAAW,CAAC,EAAO,EAAW,CAAC,KAAK,aAAa,OAAO,SAAS,MAAM,WAAW,CAAC,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,QAAQ,OAAO,cAAc,SAAS,IAAI,OAAO,SAAS,QAAQ,SAAS,WAAW,CAAC,SAAS,CAAc,EAAM,EAAO,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,SAAS,WAA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