{"version":3,"file":"Button.Bh4Rf82P.mjs","names":["useState","useRef","colors.gray800","colors.white","colors.red500","colors.gray100"],"sources":["https:/framerusercontent.com/modules/IbnR7OmyIrJARuir5R6M/ftHROSGuYKRnU8g3I2yJ/Button.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,useRef}from\"react\";import{addPropertyControls,ControlType,Link}from\"framer\";import styled from\"styled-components\";import*as colors from\"https://framerusercontent.com/modules/xZeGYMcYRIPgzMi948rf/X6AEdKQEPsnZ12qm8wuz/styles.js\";import{isMobile}from\"https://framerusercontent.com/modules/FfJ3mEyKLVOIlc3HDCcx/zxzUhkOXpgeu9JtfnFLA/utils.js\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function Button({id,utm,type,variant,size,width,label,link,isSignup}){//\n// TODO : 12/18\n// Figure out how to add pressed and focus states to this component\n//\nconst[hoverClasses,setHoverClasses]=useState({});const signupLinkRef=useRef(null);const variants={primary:{background:colors.gray800,color:colors.white,hover:{background:colors.red500}},secondary:{background:colors.white,color:colors.gray800,border:`1.5px solid ${colors.gray800}`,hover:{background:colors.gray100}},tertiary:{background:\"none\",color:colors.gray800,hover:{background:colors.gray100}},primaryOnDark:{background:colors.white,color:colors.gray800,hover:{background:colors.gray100}}};const sizes={regular:{height:\"48px\",padding:\"16px 20px\",fontSize:\"16px\"},small:{height:\"40px\",padding:\"12px 16px\",fontSize:\"14px\"},large:{height:\"56px\",padding:\"16px 20px\",fontSize:\"18px\"}};function handleOnMouseOver(){setHoverClasses(variants[variant].hover);}function handleOnMouseLeave(){setHoverClasses({});}function getSignupUrl(){if(typeof window!==\"undefined\"&&(window.location.hostname===\"www.root-drop-399256.framer.app\"||window.location.hostname===\"root-drop-399256.framer.app\"||window.location.hostname===\"www.rocketmoney.dev\"||window.location.hostname===\"rocketmoney.dev\")){return\"https://app.rocketmoney.dev/signup\";}return\"https://app.rocketmoney.com/signup\";}useEffect(()=>{if(isSignup){if(window.location.hostname===\"www.root-drop-399256.framer.app\"||window.location.hostname===\"root-drop-399256.framer.app\"||window.location.hostname===\"www.rocketmoney.dev\"||window.location.hostname===\"rocketmoney.dev\"){const anchor=signupLinkRef.current;anchor.href=\"https://app.rocketmoney.dev/signup\";}assignSingularLink();}},[]);async function assignSingularLink(){if(isMobile()&&typeof truebill!==\"undefined\"){const singular=await truebill.singular.getSingularSDKInstance();signupLinkRef.current.href=singular.buildWebToAppLink(\"https://truebill.sng.link/A772e/vr6r\");}}const button=/*#__PURE__*/_jsx(Container,{id:id,type:type,tabIndex:-1,onMouseOver:handleOnMouseOver,onMouseLeave:handleOnMouseLeave,style:{...width===\"full\"?{width:\"1fr\"}:{},...variants[variant],...sizes[size],...hoverClasses},children:label});const baseSignupUrl=\"https://app.rocketmoney.com/signup\";const linkWithUtm=utm?`${baseSignupUrl}?${utm}`:baseSignupUrl;if(isSignup){return /*#__PURE__*/_jsx(Href,{ref:signupLinkRef,href:linkWithUtm,children:button});}if(type===\"submit\"){return button;}return /*#__PURE__*/_jsx(Link,{href:link,children:/*#__PURE__*/_jsx(Href,{children:button})});}const Href=styled.a`\n    text-decoration: none;\n    border-radius: 100px;\n    overflow: visible;\n`;const Container=styled.button`\n    cursor: pointer;\n    font-weight: 500;\n    border-radius: 100px;\n    border: none;\n    font-family: 'Wintle Text Medium', sans-serif;\n    display: flex;\n    align-items: center;\n    transition: background 200ms;\n    justify-content: center;\n`;addPropertyControls(Button,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"My Button\"},type:{type:ControlType.Enum,options:[\"button\",\"submit\"],optionTitles:[\"Button\",\"Submit\"],defaultValue:\"button\"},variant:{type:ControlType.Enum,options:[\"primary\",\"primaryOnDark\",\"secondary\",\"tertiary\"],optionTitles:[\"Primary\",\"Primary On Dark\",\"Secondary\",\"Tertiary\"],defaultValue:\"primary\"},size:{type:ControlType.Enum,options:[\"regular\",\"small\",\"large\"],optionTitles:[\"Regular\",\"Small\",\"Large\"],defaultValue:\"regular\"},width:{type:ControlType.Enum,options:[\"auto\",\"full\"],optionTitles:[\"Auto\",\"Full\"],defaultValue:\"auto\"},id:{type:ControlType.String,title:\"Id\",defaultValue:\"\"},isSignup:{type:ControlType.Boolean,title:\"Signup\",defaultValue:false},utm:{type:ControlType.String,title:\"UTM\",defaultValue:\"\",hidden(props){return props.isSignup===false;}},link:{type:ControlType.Link,title:\"Link\",hidden(props){return props.isSignup;}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Button\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Button.map"],"mappings":"sTAGG,SAAwB,EAAO,CAAC,KAAG,MAAI,OAAK,UAAQ,OAAK,QAAM,QAAM,OAAK,YAAU,CAIvF,GAAK,CAAC,EAAa,GAAiBA,EAAS,CAAC,CAAC,EAAQ,EAAcC,EAAO,IAAI,EAAQ,EAAS,CAAC,QAAQ,CAAC,WAAWC,EAAe,MAAMC,EAAa,MAAM,CAAC,WAAWC,CAAa,CAAC,EAAE,UAAU,CAAC,WAAWD,EAAa,MAAMD,EAAe,OAAO,eAAeA,IAAiB,MAAM,CAAC,WAAWG,CAAc,CAAC,EAAE,SAAS,CAAC,WAAW,OAAO,MAAMH,EAAe,MAAM,CAAC,WAAWG,CAAc,CAAC,EAAE,cAAc,CAAC,WAAWF,EAAa,MAAMD,EAAe,MAAM,CAAC,WAAWG,CAAc,CAAC,CAAC,EAAQ,EAAM,CAAC,QAAQ,CAAC,OAAO,OAAO,QAAQ,YAAY,SAAS,MAAM,EAAE,MAAM,CAAC,OAAO,OAAO,QAAQ,YAAY,SAAS,MAAM,EAAE,MAAM,CAAC,OAAO,OAAO,QAAQ,YAAY,SAAS,MAAM,CAAC,EAAE,SAAS,GAAmB,CAAC,EAAgB,EAAS,EAA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