{"version":3,"file":"InteractiveFlipCard.-K46IQPW.mjs","names":["useState","useCallback","useMemo","__esmMin","te","ne","_e","pe","p","init_npm_react_18_3_1","init_framer_B6PCHH0A","addPropertyControls","ControlType","useIsStaticRenderer","InteractiveFlipCard","props","isStatic","isHovered","setIsHovered","handleMouseEnter","handleMouseLeave","wrapperStyle","style","perspective","cardStyle","duration","faceStyle","textColor","backgroundColor","borderRadius","fontWeight","frontLabel","backFontSize","backLineHeight","backLabel","init_InteractiveFlipCard","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/UanMstOH5LqT2PYibN9i/G350SoMluQdVFZsuZ2Wq/InteractiveFlipCard.js"],"sourcesContent":["// Create a new Framer code component named \"InteractiveFlipCard\". It should render a responsive 3D flip card that rotates 180 degrees around the Y-axis on hover, with backface visibility hidden. Requirements:\n// - Default size should match an existing canvas rectangle: 199px wide by 261px high.\n// - Default surface fill: rgb(223, 236, 240).\n// - Default border radius: 20px.\n// - Front label default: \"Checkout\".\n// - Back label default: \"Points\".\n// - Font family default: Poppins, with a sensible fallback.\n// - Center label horizontally and vertically on both faces.\n// - Smooth premium transition: about 0.5s ease-in-out.\n// - Back face should be hidden until the hover flip reveals it.\n// - Keep it responsive: component should fill the instance bounds if resized in Framer, with min dimensions only as defaults.\n// - Expose property controls for frontLabel, backLabel, backgroundColor, textColor, borderRadius, fontSize, fontWeight, duration, and perspective.\n// - Keep the implementation self-contained and safe for Framer canvas rendering. Use CSS transforms/backface-visibility/preserve-3d. Do not require external dependencies.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useCallback,useMemo,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 199\n * @framerIntrinsicHeight 261\n */export default function InteractiveFlipCard(props){const{frontLabel=\"Checkout\",backLabel=`Shorter Queue lines\nBetter crowd control\nEasy checkout process\nIncrease in footfall`,backgroundColor=\"rgb(223, 236, 240)\",textColor=\"#0B1F4D\",borderRadius=20,fontSize=22,backFontSize=16,backLineHeight=1.35,fontWeight=600,duration=.5,perspective=1e3,style}=props;const isStatic=useIsStaticRenderer();const[isHovered,setIsHovered]=useState(false);const handleMouseEnter=useCallback(()=>{if(isStatic)return;startTransition(()=>setIsHovered(true));},[isStatic]);const handleMouseLeave=useCallback(()=>{if(isStatic)return;startTransition(()=>setIsHovered(false));},[isStatic]);const wrapperStyle=useMemo(()=>({...style,position:\"relative\",width:\"100%\",height:\"100%\",perspective:`${perspective}px`,cursor:isStatic?\"default\":\"pointer\"}),[style,perspective,isStatic]);const cardStyle=useMemo(()=>({position:\"relative\",width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",transition:`transform ${duration}s ease-in-out`,transform:isHovered?\"rotateY(180deg)\":\"rotateY(0deg)\",willChange:\"transform\"}),[duration,isHovered]);const faceStyle=useMemo(()=>({position:\"absolute\",inset:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\",backgroundColor,color:textColor,borderRadius,backfaceVisibility:\"hidden\",WebkitBackfaceVisibility:\"hidden\",overflow:\"hidden\",fontFamily:\"Poppins, Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",fontWeight,lineHeight:1.1,letterSpacing:\"-0.01em\",userSelect:\"none\"}),[backgroundColor,textColor,borderRadius,fontWeight]);return /*#__PURE__*/_jsx(\"div\",{style:wrapperStyle,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,role:\"button\",\"aria-label\":`${frontLabel} flip card`,tabIndex:0,children:/*#__PURE__*/_jsxs(\"div\",{style:cardStyle,children:[/*#__PURE__*/_jsx(\"div\",{style:faceStyle,\"aria-hidden\":isHovered,children:/*#__PURE__*/_jsx(\"span\",{style:{width:\"max-content\",maxWidth:\"90%\",fontSize},children:frontLabel})}),/*#__PURE__*/_jsx(\"div\",{style:{...faceStyle,transform:\"rotateY(180deg)\"},\"aria-hidden\":!isHovered,children:/*#__PURE__*/_jsx(\"span\",{style:{width:\"90%\",whiteSpace:\"pre-line\",display:\"block\",textAlign:\"center\",fontSize:backFontSize,lineHeight:backLineHeight},children:backLabel})})]})});}addPropertyControls(InteractiveFlipCard,{frontLabel:{type:ControlType.String,title:\"Front Label\",defaultValue:\"Checkout\"},backLabel:{type:ControlType.String,title:\"Back Label\",defaultValue:`Shorter Queue lines\nBetter crowd control\nEasy checkout process\nIncrease in footfall`,displayTextArea:true},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgb(223, 236, 240)\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#0B1F4D\"},borderRadius:{type:ControlType.Number,title:\"Radius\",min:0,max:80,step:1,unit:\"px\",defaultValue:20},fontSize:{type:ControlType.Number,title:\"Font Size\",min:10,max:120,step:1,unit:\"px\",defaultValue:22},backFontSize:{type:ControlType.Number,title:\"Back Font Size\",min:10,max:120,step:1,unit:\"px\",defaultValue:16},backLineHeight:{type:ControlType.Number,title:\"Back Line Height\",min:1,max:2,step:.05,defaultValue:1.35},fontWeight:{type:ControlType.Number,title:\"Font Weight\",min:100,max:900,step:100,defaultValue:600},duration:{type:ControlType.Number,title:\"Duration\",min:.1,max:2,step:.05,unit:\"s\",defaultValue:.5},perspective:{type:ControlType.Number,title:\"Perspective\",min:200,max:2500,step:50,unit:\"px\",defaultValue:1e3}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"InteractiveFlipCard\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicWidth\":\"199\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"261\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InteractiveFlipCard.map"],"mappings":"A,oMAkBG,SAAwBc,EAAoB,EAAM,CAAC,GAAK,CAAC,aAAW,WAAW,YAAU;;;s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