{"version":3,"file":"LemonSqueezy.BowVv-GN.mjs","names":["__esmMin","init_npm_react_18_3_1","window","ce","c","init_jsx_runtime","init_ssg_sandbox_shims","motion","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_CKT6jEEQ","ControlType","LemonSqueezy","props","styleOptions","paddingValue","paddingPerSide","paddingTop","paddingRight","paddingBottom","paddingLeft","padding","useConditionalScript","buttonStyles","flexAlignSwitch","hoverOptions","init_LemonSqueezy","condition","id","script","url","ref","fontControlStyles"],"sources":["https:/framerusercontent.com/modules/1mkt2plloPEOvoe16UUK/EUmeSZzQepu1cHilAvr7/LemonSqueezy.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";import{useEffect}from\"react\";/**\n *\n * LEMON SQUEEZY\n * By Benjamin\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 100\n * @framerDisableUnlink\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */ export default function LemonSqueezy(props){const{styleOptions,hoverOptions}=props;const{backgroundColor,color,borderRadius,padding,paddingPerSide,paddingTop,paddingRight,paddingBottom,paddingLeft}=styleOptions;const paddingValue=paddingPerSide?`${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`:`${padding}px`;/* Only load the lemon script if you want an Overlay\n     * Otherwise, do not include—also, only load it once\n     * whenever you have multiple instances on your page.\n     */ useConditionalScript(!props.isRedirect,\"https://app.lemonsqueezy.com/js/lemon.js\",\"lemon-squeezy-framer-component\");return /*#__PURE__*/ _jsx(motion.a,{href:props.url,className:props.isRedirect?\"\":\"lemonsqueezy-button\",target:props.isRedirect?\"_blank\":\"_self\",style:{fontSize:16,lineHeight:1,fontFamily:\"Inter\",fontWeight:500,...props.style,...buttonStyles,...props.fontControl,padding:paddingValue,color:color,backgroundColor:backgroundColor,borderRadius:borderRadius,userSelect:\"none\",placeContent:flexAlignSwitch(props.fontControl),whiteSpace:\"nowrap\"},whileHover:{scale:hoverOptions===null||hoverOptions===void 0?void 0:hoverOptions.hoverScale,backgroundColor:hoverOptions===null||hoverOptions===void 0?void 0:hoverOptions.hoverBackgroundColor,color:hoverOptions===null||hoverOptions===void 0?void 0:hoverOptions.hoverColor},transition:props.hoverTransition,children:props.text});};LemonSqueezy.displayName=\"Lemon Squeezy\";addPropertyControls(LemonSqueezy,{text:{title:\"Text\",type:ControlType.String,defaultValue:\"Buy Now\"},url:{title:\"Link\",type:ControlType.String,defaultValue:\"https://makelemonade.lemonsqueezy.com/checkout/buy/0929c351-abb3-49f7-a671-ba15406517dd\"},isRedirect:{title:\"Type\",type:ControlType.Boolean,enabledTitle:\"Link\",disabledTitle:\"Overlay\",defaultValue:true},fontControl:{type:ControlType.Font,title:\"Font\",controls:\"extended\"},styleOptions:{type:ControlType.Object,title:\"Styles\",buttonTitle:\"Button, Font\",controls:{backgroundColor:{type:ControlType.Color,title:\"Fill\",defaultValue:\"#40F\"},color:{type:ControlType.Color,defaultValue:\"#FFF\"},borderRadius:{type:ControlType.Number,title:\"Radius\",displayStepper:true,defaultValue:50},padding:{title:\"Padding\",type:ControlType.FusedNumber,toggleKey:\"paddingPerSide\",toggleTitles:[\"Padding\",\"Padding per side\"],defaultValue:10,valueKeys:[\"paddingTop\",\"paddingRight\",\"paddingBottom\",\"paddingLeft\",],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0}}},hoverOptions:{type:ControlType.Object,title:\"Hover\",buttonTitle:\"Effect\",optional:true,description:\"Learn more about the Checkout options [here](https://docs.lemonsqueezy.com/help/checkout/checkout-overlay)\",controls:{hoverScale:{type:ControlType.Number,title:\"Scale\",min:0,max:10,displayStepper:true,step:.01,defaultValue:1.1},hoverBackgroundColor:{type:ControlType.Color,title:\"Fill\",defaultValue:\"#111\",optional:true},hoverColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FFF\",optional:true},hoverTransition:{type:ControlType.Transition,title:\"Transition\",defaultValue:{type:\"spring\",stiffness:400,damping:30}}}}});const buttonStyles={display:\"flex\",placeItems:\"center\",placeContent:\"center\",textDecoration:\"none\"};/* Use external script conditionally */ const useConditionalScript=(condition,url,id)=>{useEffect(()=>{if(!condition)return;if(document.querySelector(`#${id}`))return;const script=document.createElement(\"script\");script.src=url;script.id=id;script.defer=true;script.onload=()=>{var ref;if(window.LemonSqueezy)return;(ref=window.createLemonSqueezy)===null||ref===void 0?void 0:ref.call(window);};document.body.appendChild(script);},[url,id,condition]);};/* Match flex content alignment with text align */ const flexAlignSwitch=fontControlStyles=>{if(fontControlStyles.textAlign===\"left\"){return\"flex-start\";}if(fontControlStyles.textAlign===\"right\"){return\"flex-end\";}return\"center\";};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LemonSqueezy\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicHeight\":\"100\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"200\",\"framerDisableUnlink\":\"* @framerSupportedLayoutWidth any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LemonSqueezy.map"],"mappings":"A,yOAUI,SAAwBY,EAAa,EAAM,CAAC,GAAK,CAAC,eAAa,gBAAcC,EAAW,CAAC,kBAAgB,QAAM,eAAa,UAAQ,iBAAe,aAAW,eAAa,gBAAc,eAAaC,EAAmBC,EAAaC,EAAe,GAAGC,EAAW,KAAKC,EAAa,KAAKC,EAAc,KAAKC,EAAY,IAAI,GAAGC,EAAQ,IAGhN,OAApHC,EAAqB,CAACT,EAAM,WAAW,2CAA2C,gCAAgC,EAAuB,gBAAKN,EAAO,EAAE,CAAC,KAAKM,EAAM,IAAI,UAAUA,EAAM,WAAW,GAAG,sBAAsB,OAAOA,EAAM,WAAW,SAAS,QAAQ,MAAM,CAAC,SAAS,GAAG,WAAW,EAAE,WAAW,QAAQ,WAAW,IAAI,GAAGA,EAAM,MAAM,GAAGU,EAAa,GA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