{"version":3,"file":"CustomButton.Cud_GVdx.mjs","names":["_Fragment","__esmMin","window","init_ssg_sandbox_shims","init_jsx_runtime","p","c","l","init_framer_DxfB3JJo","addPropertyControls","ControlType","emitTrack","label","href","trackId","CustomButton","props","className","CLASS","variant","size","fullWidth","CSS","newTab","ORANGE","ORANGE_HOVER","EARTH","COAL","FROST","init_CustomButton"],"sources":["https:/framerusercontent.com/modules/FrXzYZWNHlunNLGEjVoL/JOwlQonYef6F4JiYYl0L/CustomButton.js"],"sourcesContent":["// CustomButton.tsx — shared on-brand button/link as a placeable Framer code component.\n// Use on every page (/mcp, /workflows, /govern); set a per-instance Track ID.\n//\n// Tracking is BUILT IN. On click it calls window._emitUserInteractionEvent with the\n// exact same payload shape as your Events.tsx overrides (handleClick), so Growth sees\n// identical events whether a click comes from this button or from a native layer with\n// the override applied. You do NOT need to apply a Code Override to this button — in\n// fact don't, or you'll double-count. Just set the \"Track ID\" in the right panel.\n//\n// It's a plain default-exported function (no forwardRef), so it inserts and drags like\n// any Framer component.\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";const ORANGE=\"#FF4F00\";const ORANGE_HOVER=\"#E64700\";const EARTH=\"#201515\";const COAL=\"#36342E\";const FROST=\"#FFFEFB\";const CLASS=\"mcp-btn\";// Rendered with each instance via dangerouslySetInnerHTML so it's in the server HTML.\n// A plain <style>{CSS}</style> would escape the quotes and the browser drops the rules.\nconst CSS=`\n.${CLASS}{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 28px;border-radius:4px;font:600 18px/1 'Inter',-apple-system,sans-serif;letter-spacing:-.2px;white-space:nowrap;border:0;cursor:pointer;text-decoration:none;transition:background .2s,box-shadow .2s,transform .12s;}\n.${CLASS}:active{transform:scale(.98);}\n.${CLASS}.sm{min-height:46px;padding:0 22px;font-size:16px;}\n.${CLASS}.full{width:100%;}\n.${CLASS}.brand{background:${ORANGE};color:${FROST};}\n.${CLASS}.brand:hover{background:${ORANGE_HOVER};}\n.${CLASS}.earth{background:${EARTH};color:${FROST};}\n.${CLASS}.earth:hover{background:${COAL};}\n.${CLASS}.outline{background:${FROST};color:${EARTH};box-shadow:inset 0 0 0 1px ${EARTH};}\n.${CLASS}.outline:hover{background:#F8F4F0;}\n.${CLASS}.ghost{background:transparent;color:${FROST};box-shadow:inset 0 0 0 1px ${FROST};}\n.${CLASS}.ghost:hover{background:rgba(255,254,251,.08);}\n.${CLASS}.link{min-height:0;padding:0;border-radius:0;background:transparent;color:inherit;font:500 16px/1.4 'Inter',-apple-system,sans-serif;letter-spacing:0;text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px;}\n.${CLASS}.link:hover{color:${ORANGE};}`;// Mirrors handleClick() in your Events.tsx: same keys, same semantics.\n// Always button_click, links included: live CTAs are anchors wrapped in the button-click\n// override, and reports count CTA clicks by that name.\nfunction emitTrack(label,href,trackId){// @ts-ignore — injected by the live site's analytics; absent in Framer preview.\nwindow._emitUserInteractionEvent?.({event_action:\"click\",interaction_name:\"button_click\",interaction_raw_text:label,option_selected:\"\",destination_href:href||\"\",custom_tracking_fields:{element:trackId||label}});}/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 184\n * @framerIntrinsicHeight 48\n */export default function CustomButton(props){const{label=\"Connect Zapier\",href,variant=\"brand\",size=\"md\",fullWidth=false,newTab=true,trackId,style}=props;const className=[CLASS,variant,size===\"sm\"?\"sm\":\"\",fullWidth?\"full\":\"\"].filter(Boolean).join(\" \");// href -> real anchor; else button.\nif(href){return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS}}),/*#__PURE__*/_jsx(\"a\",{id:trackId||undefined,className:className,href:href,target:newTab?\"_blank\":undefined,rel:newTab?\"noopener\":undefined,onClick:()=>emitTrack(label,href,trackId),style:style,children:label})]});}return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS}}),/*#__PURE__*/_jsx(\"button\",{id:trackId||undefined,className:className,onClick:()=>emitTrack(label,undefined,trackId),style:style,children:label})]});}addPropertyControls(CustomButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Connect Zapier\"},href:{type:ControlType.Link,title:\"Link\",description:\"Leave empty to render a button instead of a link\"},variant:{type:ControlType.Enum,title:\"Style\",defaultValue:\"brand\",options:[\"brand\",\"earth\",\"outline\",\"ghost\",\"link\"],optionTitles:[\"Brand\",\"Earth\",\"Outline\",\"Ghost\",\"Text link\"]},size:{type:ControlType.Enum,title:\"Size\",defaultValue:\"md\",options:[\"md\",\"sm\"],optionTitles:[\"Medium\",\"Small\"]},fullWidth:{type:ControlType.Boolean,title:\"Full width\",defaultValue:false},newTab:{type:ControlType.Boolean,title:\"Open in new tab\",defaultValue:true},trackId:{type:ControlType.String,title:\"Track ID\",placeholder:\"hero_connect\",description:\"Sent as custom_tracking_fields.element\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CustomButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicHeight\":\"48\",\"framerSupportedLayoutWidth\":\"auto\",\"framerIntrinsicWidth\":\"184\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomButton.map"],"mappings":"A,wLA8BA,SAASW,EAAU,EAAM,EAAK,EAAQ,CACtCT,EAAO,4BAA4B,CAAC,aAAa,QAAQ,iBAAiB,eAAe,qBAAqBU,EAAM,gBAAgB,GAAG,iBAAiBC,GAAM,GAAG,uBAAuB,CAAC,QAAQC,GAASF,CAAK,CAAC,CAAC,CAAE,CAKhN,SAAwBG,EAAa,EAAM,CAAC,GAAK,CAAC,QAAM,iBAAiB,OAAK,UAAQ,QAAQ,OAAK,KAAK,YA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