{"version":3,"file":"AI_Animation.DOM73S_g.mjs","names":["React.useState","React.useRef"],"sources":["https:/framerusercontent.com/modules/lbpxIB7Gz1bU1eeYXbdO/TGY54gkGGXjRABRndzS9/AI_Animation.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{motion}from\"framer-motion\";// The conversation data\nconst AI_MESSAGES=[{text:\"What were my top selling items last weekend?\",user:true},{text:\"Your top 3: Wagyu Burger ($12,400), House Pasta ($8,200), Truffle Fries ($6,100). Want to see this by location?\",user:false},{text:\"Which tables have the highest average spend?\",user:true},{text:\"Table 12 (window) averages $187/cover — 2.4\\xd7 your venue average. All 3 highest-spend tables are by the windows.\",user:false},{text:\"What day should I run my next promotion?\",user:true},{text:\"Tuesday at 6pm — your slowest slot. A 20% loyalty offer there would lift covers by an estimated 34%.\",user:false}];export default function AISection(){const[visibleCount,setVisibleCount]=React.useState(1);const scrollRef=React.useRef(null);const[key,setKey]=React.useState(0);// Timeline logic to reveal messages one by one\nReact.useEffect(()=>{const timer=setInterval(()=>{setVisibleCount(prev=>{if(prev>=AI_MESSAGES.length){// Pause at the end, then reset to loop the animation\nsetTimeout(()=>{setVisibleCount(1);setKey(k=>k+1);},2500);return prev;}return prev+1;});},2200)// Speed between messages\n;return()=>clearInterval(timer);},[]);// Auto-scroll to bottom when a new message appears\nReact.useEffect(()=>{if(scrollRef.current){scrollRef.current.scrollTop=scrollRef.current.scrollHeight;}},[visibleCount]);const msgs=AI_MESSAGES.slice(0,visibleCount);// Framer motion variants mimicking your custom CSS cubic-bezier\nconst msgPopVariants={hidden:{opacity:0,scale:.82,y:8},visible:{opacity:1,scale:1,y:0,transition:{duration:.45,ease:[.34,1.56,.64,1]}}};return /*#__PURE__*/_jsx(\"section\",{style:{background:\"#0E3727\",padding:\"0\",width:\"100%\",minHeight:\"500px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",maxWidth:540,margin:\"0 auto\",padding:\"0\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{background:\"rgba(255,255,255,0.04)\",border:\"1px solid rgba(255,255,255,0.08)\",borderRadius:20,padding:24,display:\"flex\",flexDirection:\"column\"},children:[/*#__PURE__*/_jsx(\"div\",{ref:scrollRef,style:{display:\"flex\",flexDirection:\"column\",gap:10,overflowY:\"hidden\",overflowX:\"hidden\",maxHeight:340,paddingBottom:10,scrollBehavior:\"smooth\"},children:msgs.map((msg,i)=>{const isNewest=i===msgs.length-1;const age=msgs.length-1-i;// Calculate fade and scale based on message age\nconst opacity=age===0?1:age===1?.72:age===2?.5:.35;const scale=age===0?1:age===1?.98:.96;return /*#__PURE__*/_jsx(motion.div,{initial:isNewest?\"hidden\":false,animate:isNewest?\"visible\":{opacity,scale,y:0},variants:msgPopVariants,style:{display:\"flex\",justifyContent:msg.user?\"flex-end\":\"flex-start\",transformOrigin:msg.user?\"bottom right\":\"bottom left\"},children:/*#__PURE__*/_jsx(\"div\",{style:{background:msg.user?\"#29C864\":\"rgba(255,255,255,0.1)\",color:msg.user?\"#003826\":\"#FAF7E9\",fontFamily:\"'Hanken Grotesk',sans-serif\",fontWeight:msg.user?600:400,fontSize:isNewest?14:13,padding:\"10px 16px\",borderRadius:msg.user?\"16px 16px 4px 16px\":\"16px 16px 16px 4px\",maxWidth:\"84%\",lineHeight:\"1.55\"},children:msg.text})},`${key}-${i}`);})}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:10,marginTop:12,background:\"rgba(255,255,255,0.05)\",borderRadius:12,padding:\"10px 16px\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:\"'Hanken Grotesk',sans-serif\",fontSize:13,color:\"rgba(250,247,233,0.32)\",flex:1},children:\"Ask anything about your venues...\"}),/*#__PURE__*/_jsx(\"div\",{style:{background:\"#29C864\",borderRadius:\"50%\",width:32,height:32,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",flexShrink:0},children:/*#__PURE__*/_jsx(\"span\",{style:{color:\"#003826\",fontSize:14,fontWeight:800},children:\"↑\"})})]})]})})});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AISection\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AI_Animation.map"],"mappings":"wLAColB,SAAwB,GAAW,CAAC,GAAK,CAAC,EAAa,GAAiBA,EAAe,CAAC,EAAQ,EAAUC,EAAa,IAAI,EAAO,CAAC,EAAI,GAAQD,EAAe,CAAC,EACnvB,MAAoB,CAAC,IAAM,EAAM,gBAAgB,CAAC,EAAgB,GAAU,GAAM,EAAY,QAC9F,eAAe,CAAC,EAAgB,CAAC,EAAE,EAAO,GAAG,EAAE,CAAC,CAAE,EAAE,IAAI,EAAS,GAAa,EAAK,CAAG,CAAE,EAAE,IAAI,EAC7F,UAAU,cAAc,CAAK,CAAE,EAAE,CAAC,CAAC,EACpC,MAAoB,CAAI,EAAU,UAAS,EAAU,QAAQ,UAAU,EAAU,QAAQ,aAAc,EAAE,CAAC,CAAY,CAAC,EAAE,IAAM,EAAK,EAAY,MAAM,EAAE,CAAY,EAC9J,EAAe,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,CAAC,SAAS,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,OAAoB,EAAK,UAAU,CAAC,MAAM,CAAC,WAAW,UAAU,QAAQ,IAAI,MAAM,OAAO,UAAU,QAAQ,QAAQ,OAAO,WAAW,SAAS,eAAe,QAAQ,EAAE,SAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,SAAS,IAAI,OAAO,SAAS,QAAQ,GAAG,EAAE,SAAsB,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