{"version":3,"file":"FilloutPopupButton.BCt6TzyD.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/D3mCvTInYWqS8HjUfeaj/csGUlwfMEiYRgPwIBk5E/FilloutPopupButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect}from\"react\";function Modal({filloutId,popupSize,onClose}){const sizeMap={small:\"500px\",medium:\"700px\",large:\"900px\"};const modalWidth=sizeMap[popupSize]??\"700px\";useEffect(()=>{const handleKey=e=>{if(e.key===\"Escape\")onClose();};document.addEventListener(\"keydown\",handleKey);document.body.style.overflow=\"hidden\";return()=>{document.removeEventListener(\"keydown\",handleKey);document.body.style.overflow=\"\";};},[onClose]);useEffect(()=>{const overlay=document.createElement(\"div\");overlay.style.cssText=`\n            position: fixed;\n            inset: 0;\n            background: rgba(0,0,0,0.55);\n            display: flex;\n            align-items: center;\n            justify-content: center;\n            z-index: 2147483647;\n        `;const modal=document.createElement(\"div\");modal.style.cssText=`\n            position: relative;\n            width: ${modalWidth};\n            max-width: 95vw;\n            max-height: 90vh;\n            background: #fff;\n            border-radius: 12px;\n            overflow: hidden;\n            box-shadow: 0 24px 64px rgba(0,0,0,0.25);\n        `;const closeBtn=document.createElement(\"button\");closeBtn.textContent=\"✕\";closeBtn.style.cssText=`\n            position: absolute;\n            top: 12px;\n            right: 12px;\n            z-index: 10;\n            width: 32px;\n            height: 32px;\n            border-radius: 50%;\n            border: none;\n            background: rgba(0,0,0,0.08);\n            cursor: pointer;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n            font-size: 16px;\n            color: #333;\n        `;const iframe=document.createElement(\"iframe\");iframe.src=`https://forms.fillout.com/t/${filloutId}?embed=1`;iframe.style.cssText=`\n            width: 100%;\n            height: 80vh;\n            border: none;\n            display: block;\n        `;iframe.allow=\"camera; microphone; geolocation\";modal.appendChild(closeBtn);modal.appendChild(iframe);overlay.appendChild(modal);document.body.appendChild(overlay);const handleOverlayClick=e=>{if(e.target===overlay)onClose();};const handleCloseClick=()=>onClose();overlay.addEventListener(\"click\",handleOverlayClick);closeBtn.addEventListener(\"click\",handleCloseClick);return()=>{overlay.removeEventListener(\"click\",handleOverlayClick);closeBtn.removeEventListener(\"click\",handleCloseClick);if(document.body.contains(overlay)){document.body.removeChild(overlay);}};},[filloutId,modalWidth,onClose]);return null;}export default function FilloutPopupButton({filloutId=\"3PHucr4tbous\",label=\"Lodge a Claim\",popupSize=\"medium\",variant=\"filled\"}){const[isOpen,setIsOpen]=useState(false);const[hovered,setHovered]=useState(false);// Filled: Button 05 — dark fill, white text, 16px radius\nconst filledStyle={display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",padding:\"12px 33px\",fontSize:\"16px\",lineHeight:\"170%\",fontWeight:\"500\",fontFamily:\"Inter, sans-serif\",letterSpacing:\"-0.3px\",cursor:\"pointer\",whiteSpace:\"nowrap\",boxSizing:\"border-box\",outline:\"none\",WebkitAppearance:\"none\",backgroundColor:hovered?\"rgb(13, 82, 124)\":\"rgb(49, 39, 48)\",color:\"#ffffff\",border:\"none\",borderRadius:\"16px\",transition:\"background-color 0.2s ease\"};// Ghost: Button 07 — no background, no border, text + chevron, 32px radius\nconst ghostStyle={display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:\"8px\",padding:\"0px\",fontSize:\"16px\",lineHeight:\"170%\",fontWeight:\"500\",fontFamily:\"Inter, sans-serif\",letterSpacing:\"-0.3px\",cursor:\"pointer\",whiteSpace:\"nowrap\",boxSizing:\"border-box\",outline:\"none\",WebkitAppearance:\"none\",backgroundColor:\"transparent\",color:hovered?\"rgb(13, 82, 124)\":\"rgb(3, 11, 34)\",border:\"none\",borderRadius:\"32px\",transition:\"color 0.2s ease\"};return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"inline-flex\"},children:[/*#__PURE__*/_jsxs(\"button\",{onClick:()=>setIsOpen(true),onMouseEnter:()=>setHovered(true),onMouseLeave:()=>setHovered(false),style:variant===\"filled\"?filledStyle:ghostStyle,children:[label,variant===\"ghost\"&&/*#__PURE__*/_jsx(\"span\",{style:{fontSize:\"18px\",lineHeight:1},children:\"›\"})]}),isOpen&&/*#__PURE__*/_jsx(Modal,{filloutId:filloutId,popupSize:popupSize,onClose:()=>setIsOpen(false)})]});}addPropertyControls(FilloutPopupButton,{filloutId:{type:ControlType.String,title:\"Fillout ID\",defaultValue:\"3PHucr4tbous\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Lodge a Claim\"},popupSize:{type:ControlType.Enum,title:\"Popup Size\",options:[\"small\",\"medium\",\"large\"],defaultValue:\"medium\"},variant:{type:ControlType.Enum,title:\"Variant\",options:[\"filled\",\"ghost\"],optionTitles:[\"Filled\",\"Ghost\"],defaultValue:\"filled\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FilloutPopupButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FilloutPopupButton.map"],"mappings":"mLAAmJ,SAAS,EAAM,CAAC,YAAU,YAAU,WAAS,CAA4D,IAAM,EAAnD,CAAC,MAAM,QAAQ,OAAO,QAAQ,MAAM,QAAQ,CAA0B,IAAY,QAsC+T,OAtCvT,MAAc,CAAC,IAAM,EAAU,GAAG,CAAI,EAAE,MAAM,UAAS,GAAS,EAAwF,OAArF,SAAS,iBAAiB,UAAU,EAAU,CAAC,SAAS,KAAK,MAAM,SAAS,aAAmB,CAAC,SAAS,oBAAoB,UAAU,EAAU,CAAC,SAAS,KAAK,MAAM,SAAS,KAAO,CAAC,EAAQ,CAAC,CAAC,MAAc,CAAC,IAAM,EAAQ,SAAS,cAAc,MAAM,CAAC,EAAQ,MAAM,QAAQ;;;;;;;;UAQpnB,IAAM,EAAM,SAAS,cAAc,MAAM,CAAC,EAAM,MAAM,QAAQ;;qBAEnD,EAAW;;;;;;;UAOtB,IAA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