{"version":3,"file":"CaptureButton.ByAZi13i.mjs","names":[],"sources":["https:/framerusercontent.com/modules/T9q6OXDnK5BeTpEEuTKH/1wsCIvNGjzUBH0ZBpQxx/CaptureButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useCallback}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function CaptureButton({label,subtext,eventName,url,openInNewTab,variant,paddingX,paddingY,fontSize}){const handleClick=useCallback(()=>{if(typeof window!==\"undefined\"&&window.posthog){window.posthog.capture(eventName,{$set_once:{[`clicked_${eventName}`]:true}});}},[eventName]);const buttonStyle={padding:`${paddingY}px ${paddingX}px`,fontFamily:`\"Instrument Sans\", sans-serif`,fontWeight:500,fontSize:`${fontSize}px`,borderRadius:4,cursor:\"pointer\",backgroundColor:variant===\"primary\"?\"#1f1b18\":\"#1f1b180A\",color:variant===\"primary\"?\"#fff\":\"#1f1b18\",border:variant===\"primary\"?\"none\":\"1px solid #1f1b1814\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:\"8px\",lineHeight:1.5,textDecoration:\"none\"};const labelStyle={fontWeight:500};const subtextStyle={opacity:.5,fontWeight:400,fontSize:`${fontSize-0}px`};const content=/*#__PURE__*/_jsxs(\"button\",{type:\"button\",style:buttonStyle,onClick:handleClick,children:[/*#__PURE__*/_jsx(\"span\",{style:labelStyle,children:label}),subtext&&/*#__PURE__*/_jsx(\"span\",{style:subtextStyle,children:subtext})]});return url?/*#__PURE__*/_jsx(\"a\",{href:url,target:openInNewTab?\"_blank\":\"_self\",rel:openInNewTab?\"noopener noreferrer\":\"\",style:{display:\"inline-block\",width:\"auto\",height:\"auto\"},children:content}):content;}addPropertyControls(CaptureButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Request early access\"},subtext:{type:ControlType.String,title:\"Subtext\",defaultValue:\"\",placeholder:\"Optional subtext\"},eventName:{type:ControlType.String,title:\"Event Name\",defaultValue:\"clicked_request_early_access\"},url:{type:ControlType.String,title:\"Link (optional)\",defaultValue:\"\",placeholder:\"https://example.com\"},openInNewTab:{type:ControlType.Boolean,title:\"Open in new tab\",defaultValue:true,hidden:props=>!props.url},variant:{type:ControlType.Enum,title:\"Variant\",options:[\"primary\",\"secondary\"],optionTitles:[\"Primary (black)\",\"Secondary (light gray)\"],defaultValue:\"primary\"},paddingX:{type:ControlType.Number,title:\"Padding X\",defaultValue:20,min:0,max:100},paddingY:{type:ControlType.Number,title:\"Padding Y\",defaultValue:12,min:0,max:100},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:16,min:8,max:64}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CaptureButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CaptureButton.map"],"mappings":"iTAA4I,SAAwB,EAAc,CAAC,QAAM,UAAQ,YAAU,MAAI,eAAa,UAAQ,WAAS,WAAS,WAAS,CAAC,CAAC,IAAM,EAAY,EAAY,IAAI,CAAC,AAAU,YAAsB,EAAO,SAAS,EAAO,QAAQ,QAAQ,EAAU,CAAC,UAAU,GAAG,UAAU,MAAa,CAAK,CAAC,EAAC,AAAG,EAAC,CAAC,CAAU,EAAC,CAAO,EAAY,CAAC,WAAW,EAAS,KAAK,EAAS,IAAI,WAAA,gCAA2C,WAAW,IAAI,YAAY,EAAS,IAAI,aAAa,EAAE,OAAO,UAAU,gBAAgB,IAAU,UAAU,UAAU,YAAY,MAAM,IAAU,UAAU,OAAO,UAAU,OAAO,IAAU,UAAU,OAAO,sBAAsB,QAAQ,cAAc,WAAW,SAAS,eAAe,SAAS,IAAI,MAAM,WAAW,IAAI,eAAe,MAAO,EAAO,EAAW,CAAC,WAAW,GAAI,EAAO,EAAa,CAAC,QAAQ,GAAG,WAAW,IAAI,YAAY,EAAS,EAAE,GAAI,EAAO,EAAqB,EAAM,SAAS,CAAC,KAAK,SA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