{"version":3,"file":"Button.AddIO6-9.mjs","names":["identifierIDParam","sponsorID","sponsorIDFromStorage","identifierIDFromStorage"],"sources":["https:/framer.com/m/useParams-SU7t.js@5CgquoKoNZj0lCLvSv2h","https:/framer.com/m/useLinkResolver-n9qB.js@BKq62hIDUfEeoyPH8iB1","https:/framerusercontent.com/modules/rzCd5HLos5PTvRHBje0g/WzJVDky5wsYWQ7rMbnW1/Button.js"],"sourcesContent":["import{useSponsor}from\"https://framer.com/m/useSponsor-VJAz.js@3moiMSmzD9j4Sz8NSHF6\";export const useParams=()=>{const url=new URL(window.location.href);const sponsorIDParam=url.searchParams.get(\"sponsorID\");const sponsorParam=url.searchParams.get(\"sponsor\");const identifierIDParam=url.searchParams.get(\"identifierID\");const sponsorID=sponsorIDParam??sponsorParam;const sponsorIDFromStorage=window.localStorage.getItem(\"sponsorID\");const identifierIDFromStorage=window.localStorage.getItem(\"identifierID\");const scrollToID=url.hash;console.table({sponsorIDParam,sponsorParam,identifierIDParam,sponsorID,sponsorIDFromStorage,identifierIDFromStorage,scrollToID});const prospectingUrlQueryParams=`${sponsorID&&`?sponsorID=${sponsorID}`}\n\n    ${identifierIDParam&&sponsorID?`&identifierID=${identifierIDParam}`:identifierIDParam&&!sponsorID?`?identifierID=${identifierIDParam}`:\"\"}`;if(identifierIDParam){window.localStorage.setItem(\"identifierID\",identifierIDParam);}if(sponsorID){window.localStorage.setItem(\"sponsorID\",sponsorID);}return{identifierIDParam,sponsorIDParam,sponsorID,scrollToID,prospectingUrlQueryParams,sponsorIDFromStorage,identifierIDFromStorage};};export const useValidSponsor=()=>{const url=new URL(window.location.href);const sponsorIDParam=url.searchParams.get(\"sponsorID\");const sponsorParam=url.searchParams.get(\"sponsor\");const identifierIDParam=url.searchParams.get(\"identifierID\");const sponsorID=sponsorIDParam??sponsorParam;const sponsorIDFromStorage=window.localStorage.getItem(\"sponsorID\");const identifierIDFromStorage=window.localStorage.getItem(\"identifierID\");const scrollToID=url.hash;const{error:sponsorError,data:sponsorData}=useSponsor(sponsorID??sponsorIDFromStorage);const sponsor=sponsorData?.user;return{isValidSponsor:!!sponsor,sponsor:sponsor,error:sponsorError};};\nexport const __FramerMetadata__ = {\"exports\":{\"useParams\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useValidSponsor\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./useParams.map","import{useParams}from\"https://framer.com/m/useParams-SU7t.js@5CgquoKoNZj0lCLvSv2h\";const{sponsorID,identifierIDParam,sponsorIDFromStorage,identifierIDFromStorage}=useParams();export const resolveLinkUrlParams=(link,scrollToID,sponsorAsSlug,isNewParam)=>{const paramStartType=isNewParam?\"?\":\"&\";const identifierParamStart=!sponsorIDFromStorage?paramStartType:sponsorIDFromStorage&&sponsorAsSlug?paramStartType:\"&\";const resolvedSponsorParam=sponsorIDFromStorage&&sponsorAsSlug?`/${sponsorIDFromStorage}`:sponsorIDFromStorage&&!sponsorAsSlug?`${paramStartType}sponsor=${sponsorIDFromStorage}`:\"\";const resolvedIdentifierParam=identifierIDFromStorage?`${identifierParamStart}identifierID=${identifierIDFromStorage}`:\"\";const resolvedScrollToHash=scrollToID??\"\";return`${link}${resolvedSponsorParam}${resolvedIdentifierParam}${resolvedScrollToHash}`;};\nexport const __FramerMetadata__ = {\"exports\":{\"resolveLinkUrlParams\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./useLinkResolver.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";import{resolveLinkUrlParams}from\"https://framer.com/m/useLinkResolver-n9qB.js@BKq62hIDUfEeoyPH8iB1\";/**\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 */// NOTE: This Is the Correct Button we use EVERYWHERE\nexport default function Button(props){const{title,color,fill,isOutline,gradient,radius,padding,style,fontSize,onClick,linkurl,attachSponsor,sponsorAsSlug,isNewQueryParam,openNewTab,scrollToId}=props;const resolvedLinkUrl=resolveLinkUrlParams(linkurl,scrollToId,sponsorAsSlug,isNewQueryParam);const resolveButtonGradient=()=>{switch(gradient){case\"promptings\":return\"linear-gradient(281deg, #00e0e0 0%, rgb(5, 197, 235) 100%)\";case\"portal\":return\"linear-gradient()\";default:return fill;}};const shouldResolveLink=attachSponsor||scrollToId;const resolveButtonLink=()=>shouldResolveLink?resolvedLinkUrl:linkurl;return /*#__PURE__*/_jsx(motion.a,{style:{cursor:\"pointer\",textDecoration:\"none\",display:\"block\"},href:resolveButtonLink(),target:openNewTab?\"_blank\":\"initial\",children:/*#__PURE__*/_jsx(motion.div,{style:{...style,...containerStyle},children:/*#__PURE__*/_jsx(motion.div,{style:{padding:padding,borderRadius:radius,background:gradient!==\"none\"?resolveButtonGradient():isOutline?\"transparent\":fill,color:color,border:isOutline?`2px solid ${fill}`:\"none\",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:\"?\",scrollToId:\"\"}};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\"},fill:{title:\"Fill\",type:ControlType.Color},isOutline:{title:\"Outline Button\",type:ControlType.Boolean,defaultValue:false},gradient:{title:\"Gradient Background\",type:ControlType.Enum,defaultValue:\"none\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",options:[\"none\",\"promptings\"],optionTitles:[\"No Gradient\",\"Promptings Gradient\"]},linkurl:{type:ControlType.String,defaultValue:\"https://app.sendoutcards.com/?client=promptings&affiliatejoin\",description:\"Supports both full url and /pagename slugs, to use a full url the value of this field must start with http or https:// \"},scrollToId:{type:ControlType.String,defaultValue:\"\",description:\"Will insert scrollTo has to the end of the formated url\"},attachSponsor:{type:ControlType.Boolean,defaultValue:true},sponsorAsSlug:{type:ControlType.Boolean,defaultValue:false,description:\"If true the sponsor will be placed at the end of the url with a /122485\"},isNewQueryParam:{type:ControlType.Boolean,defaultValue:false},openNewTab:{type:ControlType.Boolean,defaultValue:true}});const containerStyle={display:\"flex\",justifyContent:\"start\",alignItems:\"center\",overflow:\"hidden\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Button\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Button.map"],"mappings":"6aAAqF,CAAa,MAAc,CAAC,IAAM,EAAI,IAAI,IAAI,EAAO,SAAS,KAAK,CAAO,EAAe,EAAI,aAAa,IAAI,YAAY,CAAO,EAAa,EAAI,aAAa,IAAI,UAAU,CAAOA,EAAkB,EAAI,aAAa,IAAI,eAAe,CAAOC,EAAU,GAAgB,EAAmBC,EAAqB,EAAO,aAAa,QAAQ,YAAY,CAAOC,EAAwB,EAAO,aAAa,QAAQ,eAAe,CAAO,EAAW,EAAI,KAAK,QAAQ,MAAM,CAAC,iBAAe,eAAa,kBAAA,EAAkB,UAAA,EAAU,qBAAA,EAAqB,wBAAA,EAAwB,aAAW,CAAC,CAAC,IAAM,EAA0B,GAAGF,GAAW,cAAcA,IAAY;;MAExtBD,GAAmBC,EAAU,iBAAiBD,IAAoBA,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