{"version":3,"file":"Animation.BeRnD38M.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/peMLpOn3m1RFJS8RhIbC/TLHwmO0JXpVkh4NpTuaL/Animation.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{Frame,addPropertyControls,ControlType}from\"framer\";// Import the font (use Google Fonts or a CDN)\nconst clashGroteskFontURL=\"https://fonts.googleapis.com/css2?family=Clash+Grotesk:wght@400;500;600;700&display=swap\";if(typeof window!==\"undefined\"){const link=document.createElement(\"link\");link.href=clashGroteskFontURL;link.rel=\"stylesheet\";document.head.appendChild(link);}export function TypingAnimation({words=[\"AI-enabled\",\"CRM Kanban\",\"Automation\",\"Integration\",\"Smart Reply\",\"Broadcast\",\"Workflow\"],typingSpeed=200,deletingSpeed=200,pauseDuration=3e3,fontSize=48,fontWeight=\"500\",textColor=\"#D2DE32\",cursorColor=\"#D2DE32\",cursorHeightFactor=.8,cursorWidth=2}){const[currentWordIndex,setCurrentWordIndex]=useState(0);const[displayedText,setDisplayedText]=useState(\"\");const[isDeleting,setIsDeleting]=useState(false);const[currentLetterIndex,setCurrentLetterIndex]=useState(0);const[reverseDeletingIndex,setReverseDeletingIndex]=useState(0);useEffect(()=>{if(!words||words.length===0){console.error(\"The 'words' array is empty or undefined.\");return;}const word=words[currentWordIndex];let timer;if(isDeleting){if(reverseDeletingIndex<word.length){setDisplayedText(word.substring(0,word.length-reverseDeletingIndex-1));timer=setTimeout(()=>{setReverseDeletingIndex(prevIndex=>prevIndex+1);},deletingSpeed);}else{setIsDeleting(false);setReverseDeletingIndex(0);setCurrentLetterIndex(0);setCurrentWordIndex(prevIndex=>(prevIndex+1)%words.length);}}else{if(currentLetterIndex<word.length){setDisplayedText(word.substring(0,currentLetterIndex+1));timer=setTimeout(()=>{setCurrentLetterIndex(prevIndex=>prevIndex+1);},typingSpeed);}else{setTimeout(()=>{setIsDeleting(true);},pauseDuration);}}return()=>clearTimeout(timer);},[displayedText,isDeleting,currentLetterIndex,reverseDeletingIndex,currentWordIndex,words,typingSpeed,deletingSpeed,pauseDuration]);return /*#__PURE__*/_jsxs(Frame,{width:\"100%\",height:\"auto\",style:{fontFamily:\"Clash Grotesk, sans-serif\",fontSize:`${fontSize}px`,fontWeight:fontWeight,color:textColor,whiteSpace:\"nowrap\",overflow:\"hidden\",backgroundColor:\"transparent\",position:\"relative\"},children:[/*#__PURE__*/_jsx(\"span\",{children:displayedText}),/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-block\",backgroundColor:cursorColor,width:`${cursorWidth}px`,height:`${fontSize*cursorHeightFactor}px`,marginLeft:\"4px\",animation:\"blink 1s step-start infinite\"}}),/*#__PURE__*/_jsx(\"style\",{children:`\n                    @keyframes blink {\n                        50% { opacity: 0; }\n                    }\n                `})]});}// Add property controls for Framer side panel\naddPropertyControls(TypingAnimation,{words:{type:ControlType.Array,propertyControl:{type:ControlType.String},title:\"Words\",defaultValue:[\"AI-enabled\",\"CRM Kanban\",\"Automation\",\"Integration\",\"Smart Reply\",\"Broadcast\",\"Workflow\"]},typingSpeed:{type:ControlType.Number,title:\"Typing Speed\",defaultValue:200,min:50,max:1e3,unit:\"ms\"},deletingSpeed:{type:ControlType.Number,title:\"Deleting Speed\",defaultValue:200,min:50,max:1e3,unit:\"ms\"},pauseDuration:{type:ControlType.Number,title:\"Pause Duration\",defaultValue:3e3,min:500,max:1e4,unit:\"ms\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:48,min:12,max:100},fontWeight:{type:ControlType.Enum,title:\"Font Weight\",options:[\"400\",\"500\",\"600\",\"700\"],optionTitles:[\"Regular\",\"Medium\",\"Semi-bold\",\"Bold\"],defaultValue:\"500\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#D2DE32\"},cursorColor:{type:ControlType.Color,title:\"Cursor Color\",defaultValue:\"#D2DE32\"},cursorHeightFactor:{type:ControlType.Number,title:\"Cursor Height Factor\",defaultValue:.8,min:.1,max:1,step:.1},cursorWidth:{type:ControlType.Number,title:\"Cursor Width\",defaultValue:2,min:1,max:10,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"TypingAnimation\":{\"type\":\"reactComponent\",\"name\":\"TypingAnimation\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Animation.map"],"mappings":"oUACoR,SAAgB,EAAgB,CAAC,QAAM,CAAC,aAAa,aAAa,aAAa,cAAc,cAAc,YAAY,WAAW,CAAC,cAAY,IAAI,gBAAc,IAAI,gBAAc,IAAI,WAAS,GAAG,aAAW,MAAM,YAAU,UAAU,cAAY,UAAU,qBAAmB,GAAG,cAAY,GAAG,CAAC,GAAK,CAAC,EAAiB,GAAqBA,EAAS,EAAE,CAAM,CAAC,EAAc,GAAkBA,EAAS,GAAG,CAAM,CAAC,EAAW,GAAeA,EAAS,GAAM,CAAM,CAAC,EAAmB,GAAuBA,EAAS,EAAE,CAAM,CAAC,EAAqB,GAAyBA,EAAS,EAAE,CAA84B,OAA74B,MAAc,CAAC,GAAG,CAAC,GAAO,EAAM,SAAS,EAAE,CAAC,QAAQ,MAAM,2CAA2C,CAAC,OAAQ,IAAM,EAAK,EAAM,GAAsB,EAAqlB,OAA5kB,EAAe,EAAqB,EAAK,QAAQ,EAAiB,EAAK,UAAU,EAAE,EAAK,OAAO,EAAqB,EAAE,CAAC,CAAC,EAAM,eAAe,CAAC,EAAwB,GAAW,EAAU,EAAE,EAAG,EAAc,GAAO,EAAc,GAAM,CAAC,EAAwB,EAAE,CAAC,EAAsB,EAAE,CAAC,EAAoB,IAAY,EAAU,GAAG,EAAM,OAAO,EAAW,EAAmB,EAAK,QAAQ,EAAiB,EAAK,UAAU,EAAE,EAAmB,EAAE,CAAC,CAAC,EAAM,eAAe,CAAC,EAAsB,GAAW,EAAU,EAAE,EAAG,EAAY,EAAO,eAAe,CAAC,EAAc,GAAK,EAAG,EA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