{"version":3,"file":"Button.LcmWNIMQ.mjs","names":[],"sources":["https:/framerusercontent.com/modules/ifXAL23EthPRY0aHhr1r/wQwgveLX1K8i0LbH58zT/resolveUrlParams.js","https:/framer.com/m/resolveUrlParams-eoJB.js@wQwgveLX1K8i0LbH58zT","https:/framerusercontent.com/modules/OMsZxWAmmRDbAsSdQfUR/ww4LZ8isonkjAJgyNT4C/Button.js"],"sourcesContent":["import{useParams}from\"https://framer.com/m/useParams-KbgL.js@qR7GBo6Trce0T0WeDFfw\";const{sponsorID,identifierIDParam,sponsorIDFromStorage,identifierIDFromStorage}=useParams();export const resolveLinkUrlParams=(link,sponsorAsSlug,paramStartType)=>{const identifierParamStart=!sponsorIDFromStorage?paramStartType:sponsorIDFromStorage&&sponsorAsSlug?paramStartType:\"&\";const resolvedSponsorParam=sponsorIDFromStorage&&sponsorAsSlug?`/${sponsorIDFromStorage}`:sponsorIDFromStorage&&!sponsorAsSlug?`${paramStartType}sponsor=${sponsorIDFromStorage}`:\"\";const resolvedIdentifierParam=identifierIDFromStorage?`${identifierParamStart}identifierID=${identifierIDFromStorage}`:\"\";return`${link}${resolvedSponsorParam}${resolvedIdentifierParam}`;};// Starting new hook for shoppingcart link formats\nexport const resolveShopCategoryUrl=shopCategoryID=>{return`https://shop.bydesign.com/SendOutCards/#/shop/from/${sponsorIDFromStorage!==null&&sponsorIDFromStorage!==void 0?sponsorIDFromStorage:\"\"}?categoryID=${shopCategoryID}`;};\nexport const __FramerMetadata__ = {\"exports\":{\"resolveShopCategoryUrl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"resolveLinkUrlParams\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./resolveUrlParams.map","/*\n * resolveUrlParams\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/ifXAL23EthPRY0aHhr1r/wQwgveLX1K8i0LbH58zT/resolveUrlParams.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";import{resolveLinkUrlParams,resolveShopCategoryUrl}from\"https://framer.com/m/resolveUrlParams-eoJB.js@wQwgveLX1K8i0LbH58zT\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/docs/guides/auto-sizing\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */ export default function Button(props){const{title,color,background,radius,padding,style,fontSize,link,shopLink,onClick}=props;const resolvedLinkUrl=resolveLinkUrlParams(link.url,link.sponsorIDAsSlug,link.paramStartType);const resolveShopLinkUrl=resolveShopCategoryUrl(shopLink.shopCategoryID);const resolveButtonBackground=()=>{switch(background.gradient){case\"promptings\":return\"linear-gradient(281deg, #00e0e0 0%, rgb(5, 197, 235) 100%)\";default:return background.solid;}};const isShopLink=shopLink.shopCategoryID>0;const willOpenNewTab=shopLink.shop&&shopLink.shouldOpenNewTab||link&&link.shouldOpenNewTab;return /*#__PURE__*/ _jsx(motion.a,{style:{cursor:\"pointer\",textDecoration:\"none\"},href:isShopLink?resolveShopLinkUrl:link.isLinkDynamic?resolvedLinkUrl:link.url,target:willOpenNewTab?\"_blank\":\"initial\",children:/*#__PURE__*/ _jsx(motion.div,{style:{...style,...containerStyle},children:/*#__PURE__*/ _jsx(motion.div,{style:{padding:padding,borderRadius:radius,background:resolveButtonBackground(),color:color,fontSize:fontSize,fontWeight:\"bold\",cursor:\"pointer\"},whileHover:{scale:1.01},children:title})})});};Button.defaultProps={background:{solid:\"#09F\",gradient:\"promptings\"},title:\"New Button\",link:{url:\"/opportunity\",shouldOpenNewTab:false,isSponsorQueryParam:false,isLinkDynamic:true,sponsorIDType:\"param\",paramStartType:\"?\"}};addPropertyControls(Button,{title:{title:\"Title\",type:ControlType.String},padding:{title:\"Padding\",defaultValue:\"15px 30px\",type:ControlType.String},fontSize:{title:\"Font Size Override\",defaultValue:\"18px\",type:ControlType.String},radius:{title:\"Radius\",defaultValue:13,type:ControlType.Number},color:{title:\"Text Color\",type:ControlType.Color,defaultValue:\"#FFF\"},background:{type:ControlType.Object,controls:{solid:{title:\"Solid Background\",type:ControlType.Color},gradient:{title:\"Gradient Background\",type:ControlType.Enum,defaultValue:\"none\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",options:[\"none\",\"promptings\"],optionTitles:[\"No Gradient\",\"Promptings Gradient\"]}}},link:{type:ControlType.Object,description:\"This option will format any non-shopping link with a sponsor slug\",controls:{url:{type:ControlType.String,defaultValue:\"\",description:\"Supports both full url and /pagename slugs, to use a full url the value of this field must start with http or https:// \"},shouldOpenNewTab:{title:\"New Tab\",type:ControlType.Boolean,defaultValue:false},isLinkDynamic:{type:ControlType.Boolean,defaultValue:true},sponsorIDAsSlug:{type:ControlType.Boolean,title:\"Slugify Sponsor?\",defaultValue:false},paramStartType:{displaySegmentedControl:true,segmentedControlDirection:\"vertical\",title:\"Param Start Type\",type:ControlType.Enum,defaultValue:\"?\",options:[\"?\",\"&\"],optionTitles:[\"Param Start (?)\",\"Param Extend (&)\"],description:\"This determines if the code generated query parameters are added to the end of a url with existing query params or at the end of the last url slug\"}}},shopLink:{type:ControlType.Object,description:\"If you are linking this button to a shopping cart link insert the categoryID here, you may leave the link field above blank\",controls:{shouldOpenNewTab:{title:\"New Tab\",type:ControlType.Boolean,defaultValue:false},isLinkDynamic:{type:ControlType.Boolean,defaultValue:true},shopCategoryID:{type:ControlType.Number,defaultValue:0,description:\"Insert shopping cart categoryID here\"}}}});const containerStyle={display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Button\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMapp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