{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/wY3g6SUwMSF2Gls4Ujss/ztuX3NJEAt5cg69bOUOC/Prompt_Examples_component.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,useCallback}from\"react\";// Custom hook for typing animation\nconst useTypingPlaceholder=(prompts,isPaused)=>{const[currentPrompt,setCurrentPrompt]=useState(\"\");const[promptIndex,setPromptIndex]=useState(0);const[isTyping,setIsTyping]=useState(true);const[isDeleting,setIsDeleting]=useState(false);const TYPING_DELAY_MIN=20;const TYPING_DELAY_MAX=50;const PROMPT_DELAY=2e3;const DELETE_DELAY=10;const getRandomDelay=useCallback(()=>{return Math.random()*(TYPING_DELAY_MAX-TYPING_DELAY_MIN)+TYPING_DELAY_MIN;},[]);useEffect(()=>{if(!isPaused){setCurrentPrompt(\"\");setIsTyping(true);setIsDeleting(false);}},[isPaused]);useEffect(()=>{if(isPaused)return;let timeout;const animateText=()=>{const currentFullPrompt=prompts[promptIndex];if(isTyping){if(currentPrompt.length<currentFullPrompt.length){timeout=setTimeout(()=>{setCurrentPrompt(prev=>currentFullPrompt.slice(0,prev.length+1));},getRandomDelay());}else{timeout=setTimeout(()=>{setIsDeleting(true);setIsTyping(false);},PROMPT_DELAY);}}else if(isDeleting){if(currentPrompt.length>0){timeout=setTimeout(()=>{setCurrentPrompt(prev=>prev.slice(0,-1));},DELETE_DELAY);}else{setIsDeleting(false);setIsTyping(true);setPromptIndex(prev=>(prev+1)%prompts.length);}}};animateText();return()=>clearTimeout(timeout);},[currentPrompt,promptIndex,isTyping,isDeleting,prompts,getRandomDelay,isPaused]);return currentPrompt;};export default function Prompt_component(props){const[message,setMessage]=useState(\"\");const[isLoading,setIsLoading]=useState(false);const[isFocused,setIsFocused]=useState(false);const MAX_CHARS=1e3;// Set up animated placeholder prompts\nconst examplePrompts=[\"Build me a database for tracking customer orders and inventory\",\"Create a schema for a social media platform with posts and comments\",\"Design a database for managing hospital patient records\",\"Make an event booking system with user registrations\",\"Build a task management system with team collaboration\"];const shouldPausePlaceholder=isFocused||message.length>0;const placeholder=useTypingPlaceholder(examplePrompts,shouldPausePlaceholder);const handleNavigate=()=>{const encodedPrompt=encodeURIComponent(message.trim());window.location.href=`https://app.gibsonai.com/signup?chat_prompt=${encodedPrompt}`;};const handleSubmit=()=>{if(!message.trim()||isLoading)return;setIsLoading(true);try{// Send event to GTM dataLayer\nif(window.dataLayer){window.dataLayer.push({event:\"prompt_submit\",prompt_length:message.length,prompt_text:message});}if(props.onSubmit){props.onSubmit(message);}handleNavigate();}catch(error){console.error(\"Error submitting prompt:\",error);}finally{setIsLoading(false);}};const handleKeyDown=e=>{// Handle CMD+Enter (Mac) or CTRL+Enter (Windows)\nif(e.key===\"Enter\"&&(e.metaKey||e.ctrlKey)){e.preventDefault();handleSubmit();}};const handleInput=e=>{const text=e.target.value;if(text.length<=MAX_CHARS){setMessage(text);}};const handleImportSchema=()=>{window.location.href=\"https://app.gibsonai.com?action=import\";};const handleConnectDatabase=()=>{window.location.href=\"https://app.gibsonai.com?action=connect\";};const promptContainerStyle={width:\"100%\",maxWidth:\"1050px\",margin:\"0 auto\",position:\"relative\"};const cardStyle={width:\"100%\",backgroundColor:\"white\",borderRadius:\"16px\",boxShadow:\"0 8px 30px rgba(0,0,0,0.12)\",position:\"relative\",transition:\"box-shadow 0.3s ease\"};const textareaStyle={width:\"100%\",padding:\"24px\",fontSize:\"18px\",backgroundColor:\"transparent\",border:\"none\",outline:\"none\",resize:\"none\",borderRadius:\"16px\",height:\"184px\",minHeight:\"56px\"};const buttonContainerStyle={position:\"absolute\",bottom:\"16px\",right:\"16px\"};const buttonStyle={padding:\"12px\",borderRadius:\"12px\",backgroundColor:\"#1e293b\",border:\"none\",cursor:\"pointer\",transition:\"background-color 0.2s ease\"};const characterCountStyle={position:\"absolute\",bottom:\"16px\",left:\"24px\",fontSize:\"14px\",color:message.length>=MAX_CHARS?\"#ef4444\":\"#6b7280\"};const ctaContainerStyle={display:\"flex\",gap:\"12px\",marginTop:\"16px\",width:\"100%\",maxWidth:\"1050px\",margin:\"16px auto 0\",justifyContent:\"center\",padding:\"0 16px\",flexWrap:\"wrap\"};const separatorStyle={textAlign:\"center\",marginTop:\"22px\",marginBottom:\"12px\",color:\"#fff\",fontSize:\"22px\",fontWeight:\"400\",fontFamily:\"'Space Grotesk', sans-serif\"};const ctaButtonStyle={padding:\"12px 24px\",borderRadius:\"12px\",backgroundColor:\"#f3f4f6\",border:\"1px solid #e5e7eb\",color:\"#374151\",fontSize:\"14px\",fontWeight:\"500\",cursor:\"pointer\",transition:\"all 0.2s ease\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",gap:\"8px\",whiteSpace:\"nowrap\",flexShrink:0};const containerStyle={height:\"100%\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\"};return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:/*#__PURE__*/_jsxs(\"div\",{style:promptContainerStyle,children:[/*#__PURE__*/_jsxs(\"div\",{style:cardStyle,onMouseEnter:e=>{e.currentTarget.style.boxShadow=\"0 8px 40px rgba(0,0,0,0.16)\";},onMouseLeave:e=>{e.currentTarget.style.boxShadow=\"0 8px 30px rgba(0,0,0,0.12)\";},children:[/*#__PURE__*/_jsx(\"textarea\",{style:textareaStyle,value:message,onChange:handleInput,onKeyDown:handleKeyDown,placeholder:isFocused?\"What do you want to build?\":placeholder,disabled:isLoading,onFocus:()=>setIsFocused(true),onBlur:()=>setIsFocused(false)}),/*#__PURE__*/_jsxs(\"div\",{style:characterCountStyle,children:[message.length,\"/\",MAX_CHARS]}),/*#__PURE__*/_jsx(\"div\",{style:buttonContainerStyle,children:/*#__PURE__*/_jsx(\"button\",{onClick:handleSubmit,\"aria-label\":\"send\",style:buttonStyle,disabled:isLoading||!message.trim(),onMouseEnter:e=>{e.currentTarget.style.backgroundColor=\"#334155\";},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=\"#1e293b\";},children:/*#__PURE__*/_jsx(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M5.99972 12L3.2688 3.12451C9.88393 5.04617 16.0276 8.07601 21.4855 11.9997C16.0276 15.9235 9.884 18.9535 3.26889 20.8752L5.99972 12ZM5.99972 12L13.5 12\",stroke:\"#C0F910\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})})})]}),/*#__PURE__*/_jsx(\"div\",{style:separatorStyle,children:\"Or use GibsonAI with your existing database\"}),/*#__PURE__*/_jsxs(\"div\",{style:ctaContainerStyle,children:[/*#__PURE__*/_jsxs(\"button\",{style:ctaButtonStyle,onClick:handleImportSchema,onMouseEnter:e=>{e.currentTarget.style.backgroundColor=\"#e5e7eb\";e.currentTarget.style.borderColor=\"#d1d5db\";},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=\"#f3f4f6\";e.currentTarget.style.borderColor=\"#e5e7eb\";},children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"}),/*#__PURE__*/_jsx(\"polyline\",{points:\"14,2 14,8 20,8\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"16\",y1:\"13\",x2:\"8\",y2:\"13\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"16\",y1:\"17\",x2:\"8\",y2:\"17\"}),/*#__PURE__*/_jsx(\"polyline\",{points:\"10,9 9,9 8,9\"})]}),\"Import existing schema\"]}),/*#__PURE__*/_jsxs(\"button\",{style:ctaButtonStyle,onClick:handleConnectDatabase,onMouseEnter:e=>{e.currentTarget.style.backgroundColor=\"#e5e7eb\";e.currentTarget.style.borderColor=\"#d1d5db\";},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=\"#f3f4f6\";e.currentTarget.style.borderColor=\"#e5e7eb\";},children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"ellipse\",{cx:\"12\",cy:\"5\",rx:\"9\",ry:\"3\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5\"})]}),\"Connect existing database\"]})]})]})});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Prompt_component\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Prompt_Examples_component.map"],
  "mappings": "8GACA,IAAMA,EAAqB,CAACC,EAAQC,IAAW,CAAC,GAAK,CAACC,EAAcC,CAAgB,EAAEC,EAAS,EAAE,EAAO,CAACC,EAAYC,CAAc,EAAEF,EAAS,CAAC,EAAO,CAACG,EAASC,CAAW,EAAEJ,EAAS,EAAI,EAAO,CAACK,EAAWC,CAAa,EAAEN,EAAS,EAAK,EAAQO,EAAiB,GAASC,EAAiB,GAASC,EAAa,IAAUC,EAAa,GAASC,EAAeC,EAAY,IAAY,KAAK,OAAO,GAAGJ,EAAiBD,GAAkBA,EAAmB,CAAC,CAAC,EAAE,OAAAM,EAAU,IAAI,CAAKhB,IAAUE,EAAiB,EAAE,EAAEK,EAAY,EAAI,EAAEE,EAAc,EAAK,EAAG,EAAE,CAACT,CAAQ,CAAC,EAAEgB,EAAU,IAAI,CAAC,GAAG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SAAS,CAAcW,EAAM,MAAM,CAAC,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,OAAO,eAAe,YAAY,IAAI,cAAc,QAAQ,eAAe,QAAQ,SAAS,CAAcD,EAAK,UAAU,CAAC,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC,EAAeA,EAAK,OAAO,CAAC,EAAE,mCAAmC,CAAC,EAAeA,EAAK,OAAO,CAAC,EAAE,qCAAqC,CAAC,CAAC,CAAC,CAAC,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE",
  "names": ["useTypingPlaceholder", "prompts", "isPaused", "currentPrompt", "setCurrentPrompt", "ye", "promptIndex", "setPromptIndex", "isTyping", "setIsTyping", "isDeleting", "setIsDeleting", "TYPING_DELAY_MIN", "TYPING_DELAY_MAX", "PROMPT_DELAY", "DELETE_DELAY", "getRandomDelay", "te", "ue", "timeout", "currentFullPrompt", "prev", "Prompt_component", "props", "message", "setMessage", "isLoading", "setIsLoading", "isFocused", "setIsFocused", "MAX_CHARS", "examplePrompts", "shouldPausePlaceholder", "placeholder", "handleNavigate", "encodedPrompt", "window", "handleSubmit", "error", "handleKeyDown", "handleInput", "text", "handleImportSchema", "handleConnectDatabase", "promptContainerStyle", "cardStyle", "textareaStyle", "buttonContainerStyle", "buttonStyle", "characterCountStyle", "ctaContainerStyle", "separatorStyle", "ctaButtonStyle", "p", "u"]
}
