{"version":3,"file":"Payment_Checkout.CD9jmJBk.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/sOTbGg8kAmUFjDxvOg1d/dkWQlEJbkQ1h8FposVYo/Payment_Checkout.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export function DonationCard(props){const{amount1,amount2,annual1,annual2,paymentLink1,paymentLink2,anyAmountLink,buttonColor,buttonTextColor,selectedCardBackground,selectedCardText,unselectedCardBackground,unselectedCardText,errorColor,monthlyLabel,contributeLabel,annualLabel,donateButtonText,processingText,anyAmountText,errorMessage,borderRadius,buttonRadius,mobileBreakpoint}=props;const[amount,setAmount]=useState(null);const[error,setError]=useState(\"\");const[isLoading,setIsLoading]=useState(false);const[donateHover,setDonateHover]=useState(false);const[anyHover,setAnyHover]=useState(false);const[isMobile,setIsMobile]=useState(false);const PAYMENT_LINKS={[amount1.toFixed(2)]:paymentLink1,[amount2.toFixed(2)]:paymentLink2};useEffect(()=>{// Check for mobile - increased breakpoint to 768px\nconst checkMobile=()=>setIsMobile(window.innerWidth<mobileBreakpoint);checkMobile();window.addEventListener(\"resize\",checkMobile);return()=>window.removeEventListener(\"resize\",checkMobile);},[mobileBreakpoint]);const presets=[{amount:amount1,annual:annual1},{amount:amount2,annual:annual2}];const handleSelectAmount=value=>{if(isLoading)return;setAmount(value);setError(\"\");};const goToPaymentLink=finalAmount=>{setIsLoading(true);setError(\"\");const key=finalAmount.toFixed(2);const paymentLink=PAYMENT_LINKS[key];if(!paymentLink){setIsLoading(false);setError(errorMessage);return;}window.open(paymentLink,\"_blank\");setIsLoading(false);};const handleDonate=()=>{if(isLoading)return;if(amount===null){setError(\"Please select a donation amount\");return;}goToPaymentLink(amount);};return /*#__PURE__*/_jsxs(\"div\",{style:{color:\"white\",background:\"rgba(255,255,255, 0.16)\",padding:isMobile?\"16px 12px\":\"20px 16px\",borderRadius:isMobile?\"16px\":`${borderRadius}px`,border:\"1px solid rgba(255, 255, 255, 0.48)\",display:\"flex\",flexDirection:\"column\",gap:isMobile?\"12px\":\"16px\",maxWidth:\"100%\",width:\"100%\",minHeight:\"fit-content\",boxSizing:\"border-box\",margin:0},children:[/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:isMobile?\"column\":\"row\",justifyContent:\"center\",gap:\"10px\",width:\"100%\",boxSizing:\"border-box\"},children:presets.map((preset,i)=>/*#__PURE__*/_jsxs(\"div\",{onClick:()=>!isLoading&&handleSelectAmount(preset.amount),style:{flex:1,minWidth:0,padding:isMobile?\"clamp(10px, 3vw, 12px)\":\"clamp(14px, 2vw, 16px)\",display:\"flex\",flexDirection:\"column\",textAlign:\"center\",borderRadius:isMobile?16:borderRadius,background:amount===preset.amount?selectedCardBackground:unselectedCardBackground,color:amount===preset.amount?selectedCardText:unselectedCardText,fontWeight:600,border:amount===preset.amount?\"1.5px solid transparent\":\"1px solid #fff\",gap:\"10px\",opacity:isLoading?.6:1,cursor:isLoading?\"not-allowed\":\"pointer\",transition:\"all 0.2s ease-in-out\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{fontSize:isMobile?\"clamp(20px, 5vw, 24px)\":\"clamp(28px, 3vw, 32px)\",fontWeight:600,lineHeight:1.2},children:[\"$\",preset.amount.toFixed(2),/*#__PURE__*/_jsx(\"span\",{style:{fontSize:isMobile?\"clamp(9px, 2.5vw, 10px)\":\"clamp(11px, 1.2vw, 12px)\"},children:monthlyLabel})]}),/*#__PURE__*/_jsxs(\"div\",{style:{fontSize:isMobile?\"clamp(11px, 3vw, 12px)\":\"clamp(12px, 1.3vw, 13px)\",fontWeight:500,lineHeight:\"160%\"},children:[contributeLabel,\" \",/*#__PURE__*/_jsx(\"br\",{}),\" $\",preset.annual,\" \",annualLabel]})]},i))}),error&&/*#__PURE__*/_jsx(\"div\",{style:{color:errorColor,marginTop:8,padding:\"8px\",backgroundColor:`${errorColor}1A`,borderRadius:\"8px\",fontSize:isMobile?\"clamp(11px, 3vw, 12px)\":\"clamp(13px, 1.5vw, 14px)\",lineHeight:1.4},children:error}),/*#__PURE__*/_jsx(\"button\",{onClick:handleDonate,onMouseEnter:()=>setDonateHover(true),onMouseLeave:()=>setDonateHover(false),style:{width:\"100%\",padding:isMobile?\"clamp(10px, 3vw, 12px)\":\"clamp(12px, 2vw, 14px)\",borderRadius:buttonRadius,background:buttonColor,color:buttonTextColor,fontWeight:\"bold\",border:\"none\",fontSize:isMobile?\"clamp(11px, 3vw, 12px)\":\"clamp(13px, 1.5vw, 14px)\",cursor:isLoading?\"not-allowed\":\"pointer\",transition:\"all 0.2s ease-in-out\",opacity:donateHover?.8:1},disabled:isLoading,children:isLoading?processingText:donateButtonText}),/*#__PURE__*/_jsx(\"div\",{onClick:()=>window.open(anyAmountLink,\"_blank\"),onMouseEnter:()=>setAnyHover(true),onMouseLeave:()=>setAnyHover(false),role:\"button\",tabIndex:0,onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \"){window.open(anyAmountLink,\"_blank\");}},style:{flex:1,padding:isMobile?\"clamp(10px, 3vw, 12px)\":\"clamp(14px, 2vw, 16px)\",display:\"flex\",flexDirection:\"column\",textAlign:\"center\",borderRadius:\"100px\",background:anyHover?\"#fff\":\"rgba(255,255,255, 0.11)\",color:anyHover?\"#000\":\"#fff\",fontWeight:600,fontSize:isMobile?\"clamp(11px, 3vw, 12px)\":\"clamp(13px, 1.5vw, 14px)\",border:\"1px solid #fff\",cursor:\"pointer\",transition:\"all 0.2s ease-in-out\",lineHeight:1.4},children:anyAmountText})]});}DonationCard.defaultProps={amount1:8.34,amount2:41.67,annual1:100,annual2:500,paymentLink1:\"https://donate.stripe.com/6oUdR8baO4wv4ZI0m54wM01\",paymentLink2:\"https://donate.stripe.com/7sY5kC4Mq9QP4ZI1q94wM02\",anyAmountLink:\"https://donate.stripe.com/bJe5kC3Imgfd3VEd8R4wM00\",buttonColor:\"#A38016\",buttonTextColor:\"#FFFFFF\",selectedCardBackground:\"#FFFFFF\",selectedCardText:\"#0d0d0d\",unselectedCardBackground:\"rgba(255,255,255, 0.11)\",unselectedCardText:\"#FFFFFF\",errorColor:\"#FF4D4F\",monthlyLabel:\"/month\",contributeLabel:\"Contributes\",annualLabel:\"annually\",donateButtonText:\"DONATE NOW\",processingText:\"PROCESSING...\",anyAmountText:\"Support with Any Amount – Together We Can!\",errorMessage:\"Payment link is not configured for this option.\",borderRadius:20,buttonRadius:24,mobileBreakpoint:768};addPropertyControls(DonationCard,{// AMOUNTS SECTION\namount1:{type:ControlType.Number,title:\"Amount 1\",defaultValue:8.34,min:0,step:.01,displayStepper:true},annual1:{type:ControlType.Number,title:\"Annual 1\",defaultValue:100,min:0,step:1,displayStepper:true},amount2:{type:ControlType.Number,title:\"Amount 2\",defaultValue:41.67,min:0,step:.01,displayStepper:true},annual2:{type:ControlType.Number,title:\"Annual 2\",defaultValue:500,min:0,step:1,displayStepper:true},// PAYMENT LINKS SECTION\npaymentLink1:{type:ControlType.String,title:\"Link 1\",defaultValue:\"https://donate.stripe.com/6oUdR8baO4wv4ZI0m54wM01\",displayTextArea:true},paymentLink2:{type:ControlType.String,title:\"Link 2\",defaultValue:\"https://donate.stripe.com/7sY5kC4Mq9QP4ZI1q94wM02\",displayTextArea:true},anyAmountLink:{type:ControlType.String,title:\"Any Amount Link\",defaultValue:\"https://donate.stripe.com/bJe5kC3Imgfd3VEd8R4wM00\",displayTextArea:true},// COLORS SECTION\nbuttonColor:{type:ControlType.Color,title:\"Button Color\",defaultValue:\"#A38016\"},buttonTextColor:{type:ControlType.Color,title:\"Button Text\",defaultValue:\"#FFFFFF\"},selectedCardBackground:{type:ControlType.Color,title:\"Selected Card\",defaultValue:\"#FFFFFF\"},selectedCardText:{type:ControlType.Color,title:\"Selected Text\",defaultValue:\"#0d0d0d\"},unselectedCardBackground:{type:ControlType.Color,title:\"Unselected Card\",defaultValue:\"rgba(255,255,255, 0.11)\"},unselectedCardText:{type:ControlType.Color,title:\"Unselected Text\",defaultValue:\"#FFFFFF\"},errorColor:{type:ControlType.Color,title:\"Error Color\",defaultValue:\"#FF4D4F\"},// TEXT LABELS SECTION\nmonthlyLabel:{type:ControlType.String,title:\"Monthly Label\",defaultValue:\"/month\"},contributeLabel:{type:ControlType.String,title:\"Contribute Label\",defaultValue:\"Contributes\"},annualLabel:{type:ControlType.String,title:\"Annual Label\",defaultValue:\"annually\"},donateButtonText:{type:ControlType.String,title:\"Donate Button\",defaultValue:\"DONATE NOW\"},processingText:{type:ControlType.String,title:\"Processing Text\",defaultValue:\"PROCESSING...\"},anyAmountText:{type:ControlType.String,title:\"Any Amount Text\",defaultValue:\"Support with Any Amount – Together We Can!\",displayTextArea:true},errorMessage:{type:ControlType.String,title:\"Error Message\",defaultValue:\"Payment link is not configured for this option.\",displayTextArea:true},// STYLING SECTION\nborderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:20,min:0,max:50,step:1,displayStepper:true},buttonRadius:{type:ControlType.Number,title:\"Button Radius\",defaultValue:24,min:0,max:50,step:1,displayStepper:true},mobileBreakpoint:{type:ControlType.Number,title:\"Mobile Breakpoint\",defaultValue:768,min:320,max:1024,step:1,displayStepper:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"DonationCard\":{\"type\":\"reactComponent\",\"name\":\"DonationCard\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Payment_Checkout.map"],"mappings":"sMAAmJ,SAAgB,EAAa,EAAM,CAAC,GAAK,CAAC,UAAQ,UAAQ,UAAQ,UAAQ,eAAa,eAAa,gBAAc,cAAY,kBAAgB,yBAAuB,mBAAiB,2BAAyB,qBAAmB,aAAW,eAAa,kBAAgB,cAAY,mBAAiB,iBAAe,gBAAc,eAAa,eAAa,eAAa,oBAAkB,EAAW,CAAC,EAAO,GAAWA,EAAS,IAAI,EAAO,CAAC,EAAM,GAAUA,EAAS,EAAE,EA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