{"version":3,"file":"SelectNumber.CZBAOaaU.mjs","names":["_Fragment"],"sources":["https:/framerusercontent.com/modules/glLXm4w3jcRaISl53XeD/opdZlLcCIyjhyRPJ9znO/SelectNumber.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{Frame,Stack,addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";// Envuelve los componentes de Framer para animaciones\nconst MotionStack=motion(Stack);const MotionFrame=motion(Frame);export default function SelectNumber({buttonBg=\"#1E1E1E\",dropdownBg=\"#1E1E1E\",border=\"1px solid rgba(255,255,255,0.1)\"}){const choices=[{code:\"+34\",label:\"Spain\",image:\"https://cdn-icons-png.flaticon.com/512/555/555635.png\"},{code:\"+1\",label:\"United Kingdom\",image:\"https://cdn-icons-png.flaticon.com/512/555/555417.png\"}];const[isOpen,setOpen]=React.useState(false);const toggleOpen=()=>setOpen(o=>!o);const[selected,setSelected]=React.useState(choices[0]);return /*#__PURE__*/_jsxs(Frame,{width:50,background:\"transparent\",height:40,style:{position:\"relative\"},children:[/*#__PURE__*/_jsxs(MotionStack,{direction:\"horizontal\",align:\"center\",gap:12,width:50,paddingTop:16,paddingBottom:16,background:buttonBg,height:40,style:{cursor:\"pointer\",boxShadow:\"0 4px 12px rgba(0,0,0,0.1)\",border},onTap:toggleOpen,transition:{type:\"spring\",stiffness:300,damping:30},children:[selected&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"img\",{src:selected.image,width:20,height:20,alt:`Flag ${selected.label}`,style:{borderRadius:4}}),/*#__PURE__*/_jsx(\"input\",{type:\"hidden\",name:\"code\",value:selected.code})]}),/*#__PURE__*/_jsx(motion.div,{animate:{rotate:isOpen?180:0},transition:{duration:.25},style:{display:\"flex\",alignItems:\"center\"},children:/*#__PURE__*/_jsx(\"svg\",{width:\"15\",height:\"15\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"white\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:/*#__PURE__*/_jsx(\"polyline\",{points:\"6 9 12 15 18 9\"})})})]}),/*#__PURE__*/_jsx(AnimatePresence,{children:isOpen&&/*#__PURE__*/_jsx(MotionFrame,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.2},background:dropdownBg,radius:16,style:{position:\"absolute\",top:48,width:160,height:100,zIndex:9,overflow:\"hidden\",boxShadow:\"0 8px 20px rgba(0,0,0,0.15)\",border:\"1px solid rgba(255,255,255,0.1)\"},children:/*#__PURE__*/_jsx(Stack,{direction:\"vertical\",gap:0,children:choices.map(({code,label,image})=>/*#__PURE__*/_jsxs(Frame,{height:48,padding:12,background:\"transparent\",style:{display:\"flex\",alignItems:\"center\",color:\"#EEE\",fontSize:15,cursor:\"pointer\",padding:10,gap:6},whileHover:{background:\"rgba(255,255,255,0.05)\"},onTap:()=>{setSelected({code,image,label});setOpen(false);},children:[/*#__PURE__*/_jsx(\"img\",{src:image,alt:`Flag ${label}`,width:24,height:24}),/*#__PURE__*/_jsx(\"div\",{children:label})]},code))})})})]});}addPropertyControls(SelectNumber,{buttonBg:{title:\"Background\",type:ControlType.Color},dropdownBg:{title:\"Background Dropdown\",type:ControlType.Color},border:{title:\"Border\",type:ControlType.Color,default:\"1px solid rgba(255,255,255,0.1)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SelectNumber\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SelectNumber.map"],"mappings":"2YACgE,SAAwB,EAAa,CAAC,WAAS,UAAU,aAAW,UAAU,SAAO,kCAAkC,CAAC,CAAC,IAAM,EAAQ,CAAC,CAAC,KAAK,MAAM,MAAM,QAAQ,MAAM,uDAAwD,EAAC,CAAC,KAAK,KAAK,MAAM,iBAAiB,MAAM,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