{"version":3,"file":"shared-lib.CZnFeBF7.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/zKXXnCrFJWJJnFbH5Xra/lCvUnSNLiPbh1K0dGSfq/Smartsocialproof.js","https:/framerusercontent.com/modules/ji5qrU2ez66Ho4HIwrSk/g55jm0pW6dX11trqnPFc/ffwpohr48.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{motion,AnimatePresence}from\"framer-motion\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";export default function SmartFOMO(props){const{notifications,position,showInterval,displayDuration,backgroundColor,textColor,accentColor,iconColor,borderRadius,padding,hasShadow,shadowColor,shadowY,shadowBlur,font}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const[currentIndex,setCurrentIndex]=useState(0);const[isVisible,setIsVisible]=useState(false);useEffect(()=>{// En el editor de Framer, siempre mostramos la primera notificación\nif(isCanvas){setIsVisible(true);return;}if(!notifications||notifications.length===0)return;let isMounted=true;let timer;// Secuencia estricta para evitar solapamiento de textos en la animación\nconst runCycle=()=>{if(!isMounted)return;// 1. Mostrar la notificación actual\nsetIsVisible(true);// 2. Esperar el tiempo de visualización y luego ocultar\ntimer=setTimeout(()=>{if(!isMounted)return;setIsVisible(false);// 3. Esperar el intervalo (para que termine la animación de salida)\n// y justo antes de volver a mostrar, cambiamos al siguiente texto.\ntimer=setTimeout(()=>{if(!isMounted)return;setCurrentIndex(prev=>(prev+1)%notifications.length);runCycle()// Volver a empezar el ciclo\n;},showInterval*1e3);},displayDuration*1e3);};// Iniciar el primer ciclo después del tiempo de espera inicial\ntimer=setTimeout(()=>{runCycle();},showInterval*1e3);return()=>{isMounted=false;clearTimeout(timer);};},[isCanvas,notifications,showInterval,displayDuration]);// Determinar la posición en pantalla\nconst posStyles={position:isCanvas?\"relative\":\"fixed\",bottom:isCanvas?\"auto\":\"32px\",left:position===\"Bottom Left\"&&!isCanvas?\"32px\":\"auto\",right:position===\"Bottom Right\"&&!isCanvas?\"32px\":\"auto\",zIndex:9999,pointerEvents:\"none\"};const currentNotif=notifications[currentIndex]||{name:\"John Doe\",location:\"Madrid, ES\",action:\"just bought\",product:\"Pro Plan\",time:\"just now\"};const dynamicShadow=hasShadow?`0 ${shadowY}px ${shadowBlur}px ${shadowColor}`:\"none\";return /*#__PURE__*/_jsx(\"div\",{style:{width:isCanvas?\"100%\":\"auto\",height:isCanvas?\"100%\":\"auto\",...posStyles},children:/*#__PURE__*/_jsx(AnimatePresence,{children:isVisible&&/*#__PURE__*/_jsxs(motion.div,{initial:{opacity:0,y:40,scale:.9,filter:\"blur(4px)\"},animate:{opacity:1,y:0,scale:1,filter:\"blur(0px)\"},exit:{opacity:0,y:20,scale:.95,filter:\"blur(4px)\"},transition:{type:\"spring\",stiffness:300,damping:25,mass:1},style:{display:\"flex\",alignItems:\"center\",gap:\"16px\",padding:`${padding}px`,backgroundColor:backgroundColor,backdropFilter:\"blur(24px)\",WebkitBackdropFilter:\"blur(24px)\",borderRadius:borderRadius,border:\"1px solid rgba(255,255,255,0.08)\",boxShadow:dynamicShadow,fontFamily:font?.fontFamily??\"-apple-system, BlinkMacSystemFont, 'Inter', sans-serif\",minWidth:\"300px\",maxWidth:\"400px\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"40px\",height:\"40px\",borderRadius:\"50%\",backgroundColor:accentColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",flexShrink:0,boxShadow:`0 4px 12px ${accentColor}66`},children:/*#__PURE__*/_jsxs(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:iconColor,strokeWidth:\"2.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"}),/*#__PURE__*/_jsx(\"polyline\",{points:\"22 4 12 14.01 9 11.01\"})]})}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:\"2px\",width:\"100%\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{fontSize:\"14px\",color:textColor,lineHeight:\"1.3\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontWeight:600},children:currentNotif.name}),\" \",\"in \",currentNotif.location]}),/*#__PURE__*/_jsxs(\"div\",{style:{fontSize:\"14px\",color:textColor,opacity:.8,lineHeight:\"1.3\"},children:[currentNotif.action,\" \",/*#__PURE__*/_jsx(\"span\",{style:{fontWeight:600},children:currentNotif.product})]}),/*#__PURE__*/_jsx(\"div\",{style:{fontSize:\"11px\",color:textColor,opacity:.5,marginTop:\"4px\",fontWeight:500},children:currentNotif.time})]})]})})});}addPropertyControls(SmartFOMO,{position:{type:ControlType.Enum,title:\"Position\",options:[\"Bottom Left\",\"Bottom Right\"],defaultValue:\"Bottom Left\"},showInterval:{type:ControlType.Number,title:\"Wait Time (s)\",defaultValue:5,min:1,max:60},displayDuration:{type:ControlType.Number,title:\"Display Time (s)\",defaultValue:4,min:1,max:20},font:{type:ControlType.Font,title:\"Typography\",controls:\"extended\",defaultValue:{fontFamily:\"Inter\"}},hasShadow:{type:ControlType.Boolean,title:\"Shadow\",defaultValue:true},shadowColor:{type:ControlType.Color,title:\"↳ Color\",defaultValue:\"rgba(0, 0, 0, 0.25)\",hidden:props=>!props.hasShadow},shadowY:{type:ControlType.Number,title:\"↳ Y Offset\",defaultValue:20,min:-50,max:50,hidden:props=>!props.hasShadow},shadowBlur:{type:ControlType.Number,title:\"↳ Blur\",defaultValue:40,min:0,max:100,hidden:props=>!props.hasShadow},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgba(15, 15, 17, 0.85)\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},accentColor:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#34C759\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:20},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:16},notifications:{type:ControlType.Array,title:\"Data List\",control:{type:ControlType.Object,controls:{name:{type:ControlType.String,title:\"Name\",defaultValue:\"Alex D.\"},location:{type:ControlType.String,title:\"Location\",defaultValue:\"Madrid, ES\"},action:{type:ControlType.String,title:\"Action\",defaultValue:\"just purchased\"},product:{type:ControlType.String,title:\"Product\",defaultValue:\"Pro Plan\"},time:{type:ControlType.String,title:\"Time Ago\",defaultValue:\"2 mins ago\"}}},defaultValue:[{name:\"Alex M.\",location:\"Madrid, ES\",action:\"just subscribed to\",product:\"Pro Plan\",time:\"2 mins ago\"},{name:\"Sarah K.\",location:\"Berlin, DE\",action:\"downloaded the\",product:\"UI Kit\",time:\"15 mins ago\"},{name:\"David R.\",location:\"New York, US\",action:\"started a trial for\",product:\"Team Plan\",time:\"1 hour ago\"}]}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SmartFOMO\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Smartsocialproof.map","// Generated by Framer (b135809)\nimport{fontStore}from\"framer\";fontStore.loadFonts([]);export const fonts=[{explicitInter:true,fonts:[]}];export const css=[\".framer-5F0qe .framer-styles-preset-b8vqdw:not(.rich-text-wrapper), .framer-5F0qe .framer-styles-preset-b8vqdw.rich-text-wrapper a { --framer-link-text-background-color: rgba(255, 255, 255, 0); --framer-link-text-color: #ffffff; }\"];export const className=\"framer-5F0qe\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"yPAAkN,SAAwB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