{"version":3,"file":"ModalButton.BAPUR1JS.mjs","names":["useState","startTransition"],"sources":["https:/framerusercontent.com/modules/Su93IdLEeMR4gTq9am45/K2Bp1QlijGs3S0AJzEai/ModalButton.js"],"sourcesContent":["// Modal-style buttons with hover states. Supports four click actions:\n//   - \"none\"       → just a visual button (legacy behavior)\n//   - \"link\"       → opens the linkUrl (mailto:, https://, etc.) in a new tab\n//   - \"bookCall\"   → dispatches book-call:open, which BookCallModal listens for\n//   - \"openModal\"  → dispatches a custom event by name (escape hatch)\n//\n// All Book Call buttons across the site can now point at action=\"bookCall\"\n// and they'll all trigger the same modal — no prop drilling required.\n//\n// v2: the rendered <button> now carries data-variant={variant} so\n// page-level theming (e.g. FteThemeToggle dark mode) can target the\n// dark vs light pills precisely. Purely additive — no behavior change.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * ModalButton\n *\n * @framerIntrinsicWidth 78\n * @framerIntrinsicHeight 33\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ModalButton(props){const{label=\"Book Call\",variant=\"dark\",action=\"none\",linkUrl=\"\",linkOpenInNewTab=true,eventName=\"\",darkBg=\"#22292F\",darkHover=\"#3A434B\",lightBg=\"#E6E8E9\",lightHover=\"#D1D5D8\",textColor=\"#FFFFFF\",font,style}=props;const[hover,setHover]=useState(false);const isDark=variant===\"dark\";const bg=isDark?hover?darkHover:darkBg:hover?lightHover:lightBg;const handleClick=()=>{if(typeof window===\"undefined\")return;switch(action){case\"bookCall\":window.dispatchEvent(new CustomEvent(\"book-call:open\"));break;case\"link\":if(!linkUrl)return;if(linkOpenInNewTab){window.open(linkUrl,\"_blank\",\"noopener,noreferrer\");}else{window.location.href=linkUrl;}break;case\"openModal\":if(!eventName)return;window.dispatchEvent(new CustomEvent(eventName));break;default:break;}};return /*#__PURE__*/_jsx(\"button\",{type:\"button\",\"data-variant\":variant,onClick:handleClick,style:{...style,border:\"none\",outline:\"none\",borderRadius:100,background:bg,color:textColor,cursor:action===\"none\"?\"default\":\"pointer\",transition:\"background 0.18s cubic-bezier(.4,0,.2,1)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",font:\"inherit\",...font,fontWeight:400,fontSize:font?.fontSize||15,letterSpacing:-.2,lineHeight:font?.lineHeight||\"1em\",padding:\"0 20px\",userSelect:\"none\",minWidth:78,minHeight:33,whiteSpace:\"nowrap\"},onMouseEnter:()=>startTransition(()=>setHover(true)),onMouseLeave:()=>startTransition(()=>setHover(false)),\"aria-pressed\":\"false\",children:label});}addPropertyControls(ModalButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Send Email\"},variant:{type:ControlType.Enum,title:\"Variant\",options:[\"dark\",\"light\"],optionTitles:[\"Dark\",\"Light\"],defaultValue:\"dark\",displaySegmentedControl:true},action:{type:ControlType.Enum,title:\"Action\",options:[\"none\",\"link\",\"bookCall\",\"openModal\"],optionTitles:[\"None\",\"Link\",\"Book Call\",\"Custom Event\"],defaultValue:\"none\",description:\"What happens on click. 'Book Call' opens the BookCallModal anywhere on the site.\"},linkUrl:{type:ControlType.String,title:\"Link URL\",defaultValue:\"\",placeholder:\"https:// or mailto:\",hidden:({action})=>action!==\"link\"},linkOpenInNewTab:{type:ControlType.Boolean,title:\"Open in new tab\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({action})=>action!==\"link\"},eventName:{type:ControlType.String,title:\"Event Name\",defaultValue:\"\",placeholder:\"e.g. case-study:open\",description:\"The custom event to dispatch on click. Listen for it with window.addEventListener.\",hidden:({action})=>action!==\"openModal\"},darkBg:{type:ControlType.Color,title:\"Dark BG\",defaultValue:\"#22292F\",hidden:({variant})=>variant!==\"dark\"},darkHover:{type:ControlType.Color,title:\"Dark Hover\",defaultValue:\"#3A434B\",hidden:({variant})=>variant!==\"dark\"},lightBg:{type:ControlType.Color,title:\"Light BG\",defaultValue:\"#E6E8E9\",hidden:({variant})=>variant!==\"light\"},lightHover:{type:ControlType.Color,title:\"Light Hover\",defaultValue:\"#D1D5D8\",hidden:({variant})=>variant!==\"light\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:15,variant:\"Medium\",letterSpacing:0,lineHeight:\"1em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ModalButton\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"33\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"78\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ModalButton.map"],"mappings":"+LAoBG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,QAAM,YAAY,UAAQ,OAAO,SAAO,OAAO,UAAQ,GAAG,mBAAiB,GAAK,YAAU,GAAG,SAAO,UAAU,YAAU,UAAU,UAAQ,UAAU,aAAW,UAAU,YAAU,UAAU,OAAK,SAAO,EAAW,CAAC,EAAM,GAAUA,EAAS,EAAK,EAAsC,EAAvB,IAAU,OAAuB,EAAM,EAAU,EAAO,EAAM,EAAW,EAA+Z,OAAoB,EAAK,SAAS,CAAC,KAAK,SAAS,eAAe,EAAQ,YAAzc,CAAI,GAAO,IAAS,OAAmB,OAAO,EAAP,CAAe,IAAI,WAAW,EAAO,cAAc,IAAI,YAAY,gBAAgB,CAAC,EAAE,MAAM,IAAI,OAAO,GAAG,CAAC,EAAQ,OAAU,EAAkB,EAAO,KAAK,EAAQ,SAAS,qBAAqB,EAAQ,EAAO,SAAS,KAAK,EAAS,MAAM,IAAI,YAAY,GAAG,CAAC,EAAU,OAAO,EAAO,cAAc,IAAI,YAAY,CAAS,CAAC,EAAE,MAAM,QAAQ,KAAM,CAAC,EAA8F,MAA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