{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/nTr7xm7oosTNVRU8qDIy/ivHFym4KlFzpBqAnkXEj/TokenFlip.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function TokenFlip({id=\"default-id\",coverImage=\"\",message=\"Default message\",signedBy=\"Anonymous\",frontBackground=\"https://framerusercontent.com/images/DlFpsPhdfrCsFwqMoEJ2RaVDceM.png\",backBackground=\"https://framerusercontent.com/images/SGW5DLxO6k30boHmQ5M4uilfw.png\",size=250}){const[isFlipped,setIsFlipped]=useState(false);const[zIndex,setZIndex]=useState(1);const isMobile=typeof window!==\"undefined\"&&window.innerWidth<=768;const handleZoom=()=>{if(isMobile){setIsFlipped(prev=>!prev);setZIndex(1e4);}};let adjustedSize=isMobile?Math.min(size,350):size;const baseFontSize=adjustedSize/2*.08;let messageFontSize=Math.min(16,Math.max(6,baseFontSize));let messageMargin=Math.min(20,Math.max(10,adjustedSize*.1));switch(true){case message.length>280:messageFontSize*=.8;break;case message.length<20:messageFontSize*=1.4;break;}switch(true){case message.length>200:messageMargin*=1.5;break;}const signedByFontSize=Math.min(18,Math.max(12,messageFontSize*.6));return /*#__PURE__*/_jsxs(motion.div,{style:{perspective:\"1200px\",width:`${adjustedSize}px`,height:`${adjustedSize}px`,position:\"relative\",cursor:\"pointer\",overflow:\"visible\",zIndex:zIndex,borderRadius:\"50%\"},onMouseEnter:()=>{setIsFlipped(true);setZIndex(1e4);},onMouseLeave:()=>{setIsFlipped(false);setZIndex(1);},onTouchStart:handleZoom,children:[/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",width:\"100%\",height:\"100%\",backfaceVisibility:\"hidden\",borderRadius:\"50%\",overflow:\"hidden\",backgroundImage:`url(${frontBackground})`,backgroundSize:\"cover\",backgroundPosition:\"center\"},animate:{rotateY:isFlipped?180:0},transition:{duration:1.2},whileHover:{scale:1.4}}),/*#__PURE__*/_jsxs(motion.div,{style:{position:\"absolute\",width:\"100%\",height:\"100%\",backfaceVisibility:\"hidden\",borderRadius:\"50%\",overflow:\"hidden\",backgroundImage:`url(${backBackground})`,backgroundSize:\"cover\",backgroundPosition:\"center\",color:\"#000\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",alignItems:\"center\",padding:\"15px\",textAlign:\"center\"},animate:{rotateY:isFlipped?0:-180},transition:{duration:1.2},whileHover:{scale:1.4},children:[/*#__PURE__*/_jsx(\"p\",{style:{fontSize:`${messageFontSize}px`,marginTop:`${messageMargin}px`,lineHeight:\"1.2\",padding:\"5px\",maxWidth:\"85%\",whiteSpace:\"normal\",wordBreak:\"break-word\",overflowWrap:\"break-word\"},children:message}),/*#__PURE__*/_jsxs(\"p\",{style:{fontSize:`${signedByFontSize}px`,fontStyle:\"italic\",margin:\"0\"},children:[\"- \",signedBy]})]})]},`inner${id}`);}// **Property Controls for Framer**\naddPropertyControls(TokenFlip,{frontBackground:{type:ControlType.Image,title:\"Front Background\"},backBackground:{type:ControlType.Image,title:\"Back Background\"},size:{type:ControlType.Number,title:\"Card Size\",defaultValue:250,min:100,max:500},message:{type:ControlType.String,title:\"Message\",defaultValue:\"Write your message here...\"},signedBy:{type:ControlType.String,title:\"Signed By\",defaultValue:\"Anonymous\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TokenFlip\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TokenFlip.map"],
  "mappings": "uJAA0L,SAARA,EAA2B,CAAC,GAAAC,EAAG,aAAa,WAAAC,EAAW,GAAG,QAAAC,EAAQ,kBAAkB,SAAAC,EAAS,YAAY,gBAAAC,EAAgB,uEAAuE,eAAAC,EAAe,qEAAqE,KAAAC,EAAK,GAAG,EAAE,CAAC,GAAK,CAACC,EAAUC,CAAY,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", "size", "isFlipped", "setIsFlipped", "ye", "zIndex", "setZIndex", "isMobile", "window", "handleZoom", "prev", "adjustedSize", "baseFontSize", "messageFontSize", "messageMargin", "signedByFontSize", "u", "motion", "p", "addPropertyControls", "ControlType"]
}
