{
  "version": 3,
  "sources": ["ssg:https://framer.com/m/resolveUrlParams-eoJB.js@wQwgveLX1K8i0LbH58zT", "ssg: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", "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//# sourceMappingURL=./Button.map"],
  "mappings": "uGAAmF,GAAK,CAAC,UAAAA,EAAU,kBAAAC,EAAkB,qBAAAC,EAAqB,wBAAAC,CAAuB,EAAEC,EAAU,EAAeC,EAAqB,CAACC,EAAKC,EAAcC,IAAiB,CAAC,IAAMC,EAAsBP,EAAoCA,GAAsBK,EAAcC,EAAe,IAAlEA,EAA4EE,E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O,YAAY,8HAA8H,SAAS,CAAC,iBAAiB,CAAC,MAAM,UAAU,KAAKA,EAAY,QAAQ,aAAa,EAAK,EAAE,cAAc,CAAC,KAAKA,EAAY,QAAQ,aAAa,EAAI,EAAE,eAAe,CAAC,KAAKA,EAAY,OAAO,aAAa,EAAE,YAAY,sCAAsC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAMF,EAAe,CAAC,QAAQ,OAAO,eAAe,SAAS,WAAW,SAAS,SAAS,QAAQ",
  "names": ["sponsorID", "identifierIDParam", "sponsorIDFromStorage", "identifierIDFromStorage", "useParams", "resolveLinkUrlParams", "link", "sponsorAsSlug", "paramStartType", "identifierParamStart", "resolvedSponsorParam", "resolvedIdentifierParam", "resolveShopCategoryUrl", "shopCategoryID", "Button", "props", "title", "color", "background", "radius", "padding", "style", "fontSize", "link", "shopLink", "onClick", "resolvedLinkUrl", "resolveLinkUrlParams", "resolveShopLinkUrl", "resolveShopCategoryUrl", "resolveButtonBackground", "isShopLink", "willOpenNewTab", "p", "motion", "containerStyle", "addPropertyControls", "ControlType"]
}
