{"version":3,"file":"shared-lib.D0G559dx.mjs","names":["useState","_Fragment","useCallback"],"sources":["https:/framerusercontent.com/modules/o9bFTZAFHjM0UZOEeCOR/UVZxKZptoPO22l1H98eg/BBTVModals.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect,useCallback}from\"react\";import ReactDOM from\"react-dom\";// ─── Overlay portal ───────────────────────────────────────────────────────────\nfunction ModalPortal({children}){if(typeof document===\"undefined\")return null;return /*#__PURE__*/ReactDOM.createPortal(children,document.body);}function ModalPanel({config,accentColor,onClose,image}){const[email,setEmail]=useState(\"\");const[honeypot,setHoneypot]=useState(\"\")// bot trap\n;const[status,setStatus]=useState(\"idle\");const[errorMsg,setErrorMsg]=useState(\"\");// Close on ESC\nuseEffect(()=>{const handler=e=>{if(e.key===\"Escape\")onClose();};window.addEventListener(\"keydown\",handler);return()=>window.removeEventListener(\"keydown\",handler);},[onClose]);const handleSubmit=async e=>{e.preventDefault();if(honeypot){setStatus(\"success\");return;}if(!email.trim())return;setStatus(\"loading\");setErrorMsg(\"\");try{const endpoint=config.formspreeEndpoint||\"\";if(!endpoint){setStatus(\"success\");return;}const res=await fetch(endpoint,{method:\"POST\",headers:{\"Content-Type\":\"application/json\",Accept:\"application/json\"},body:JSON.stringify({email})});if(res.ok){setStatus(\"success\");}else{setErrorMsg(\"Something went wrong. Please try again.\");setStatus(\"error\");}}catch{setErrorMsg(\"Network error. Please try again.\");setStatus(\"error\");}};return /*#__PURE__*/_jsxs(ModalPortal,{children:[/*#__PURE__*/_jsx(\"div\",{onClick:onClose,style:{position:\"fixed\",inset:0,backgroundColor:\"rgba(0,0,0,0.82)\",zIndex:9998,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:\"20px\",animation:\"bbtvFadeIn 0.2s ease\"},children:/*#__PURE__*/_jsxs(\"div\",{onClick:e=>e.stopPropagation(),style:{backgroundColor:\"#141414\",border:\"1px solid #2a2a2a\",maxWidth:480,width:\"100%\",padding:\"48px 40px 40px\",position:\"relative\",animation:\"bbtvSlideUp 0.25s ease\",overflow:\"hidden\"},children:[image&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"img\",{src:image,alt:\"\",style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",objectPosition:\"center\",zIndex:0}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,background:\"linear-gradient(to bottom, rgba(10,10,10,0.88) 0%, rgba(10,10,10,0.92) 100%)\",zIndex:1}})]}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",zIndex:2},children:[/*#__PURE__*/_jsx(\"button\",{onClick:onClose,\"aria-label\":\"Close\",style:{position:\"absolute\",top:-32,right:-24,background:\"none\",border:\"none\",color:\"#888\",cursor:\"pointer\",fontSize:22,lineHeight:1,padding:\"4px 8px\"},children:\"✕\"}),status===\"success\"?/*#__PURE__*/_jsxs(\"div\",{style:{textAlign:\"center\",padding:\"16px 0\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:36,marginBottom:16},children:\"✓\"}),/*#__PURE__*/_jsx(\"p\",{style:{color:\"#F2F2F2\",fontFamily:\"'Helvetica Neue', Arial, sans-serif\",fontSize:16,lineHeight:1.5,margin:0},children:config.successMessage||\"Thanks — we'll be in touch soon.\"})]}):/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"h2\",{style:{color:\"#F2F2F2\",fontFamily:\"'Helvetica Neue', Arial, sans-serif\",fontSize:22,fontWeight:800,letterSpacing:\"0.04em\",textTransform:\"uppercase\",margin:\"0 0 12px\",lineHeight:1.2,textAlign:\"center\"},children:config.title}),/*#__PURE__*/_jsx(\"p\",{style:{color:\"#aaa\",fontFamily:\"'Helvetica Neue', Arial, sans-serif\",fontSize:14,lineHeight:1.6,margin:\"0 0 28px\",textAlign:\"center\"},children:config.body}),/*#__PURE__*/_jsxs(\"form\",{onSubmit:handleSubmit,children:[/*#__PURE__*/_jsx(\"input\",{type:\"text\",name:\"website\",value:honeypot,onChange:e=>setHoneypot(e.target.value),style:{position:\"absolute\",left:\"-9999px\",opacity:0,height:0,width:0},tabIndex:-1,autoComplete:\"off\"}),/*#__PURE__*/_jsx(\"input\",{type:\"email\",placeholder:\"your@email.com\",required:true,value:email,onChange:e=>setEmail(e.target.value),style:{width:\"100%\",boxSizing:\"border-box\",backgroundColor:\"#0a0a0a\",border:\"1px solid #333\",color:\"#F2F2F2\",fontFamily:\"'Helvetica Neue', Arial, sans-serif\",fontSize:14,padding:\"14px 16px\",outline:\"none\",marginBottom:12,display:\"block\"}}),errorMsg&&/*#__PURE__*/_jsx(\"p\",{style:{color:accentColor,fontFamily:\"'Helvetica Neue', Arial, sans-serif\",fontSize:12,margin:\"0 0 12px\"},children:errorMsg}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",disabled:status===\"loading\",style:{width:\"100%\",backgroundColor:status===\"loading\"?\"#555\":accentColor,color:\"#F2F2F2\",border:\"none\",fontFamily:\"'Helvetica Neue', Arial, sans-serif\",fontSize:12,fontWeight:700,letterSpacing:\"0.12em\",textTransform:\"uppercase\",padding:\"16px\",cursor:status===\"loading\"?\"wait\":\"pointer\",transition:\"background-color 0.2s\"},children:status===\"loading\"?\"Sending…\":config.submitLabel})]})]})]})]})}),/*#__PURE__*/_jsx(\"style\",{children:`\n                @keyframes bbtvFadeIn { from { opacity: 0 } to { opacity: 1 } }\n                @keyframes bbtvSlideUp { from { opacity: 0; transform: translateY(20px) } to { opacity: 1; transform: translateY(0) } }\n            `})]});}// ─── Main component ────────────────────────────────────────────────────────────\nexport default function BBTVModals({inDevTitle=\"Request Access to BlackBoxTV Development Slate\",inDevBody=\"To explore our latest projects in development, enter your email and we'll send you access details.\",inDevSubmitLabel=\"Request Access\",inDevSuccess=\"Thanks — we'll be in touch soon.\",inDevEndpoint=\"\",inDevImage=\"\",prodTitle=\"Work With Us\",prodBody=\"Have a story, project, or production inquiry? Submit your email to request a meeting with the BlackBoxTV production team.\",prodSubmitLabel=\"Request Meeting\",prodSuccess=\"Thanks — we'll be in touch soon.\",prodEndpoint=\"\",prodImage=\"\",accentColor=\"#FF1A1A\"}){const[activeModal,setActiveModal]=useState(null);const open=useCallback(key=>setActiveModal(key),[]);const close=useCallback(()=>setActiveModal(null),[]);useEffect(()=>{const handler=e=>{const key=e.detail;if(key===\"in-development\"||key===\"production\"){open(key);}};window.addEventListener(\"bbtv-modal\",handler);return()=>window.removeEventListener(\"bbtv-modal\",handler);},[open]);const configs={\"in-development\":{title:inDevTitle,body:inDevBody,submitLabel:inDevSubmitLabel,successMessage:inDevSuccess,formspreeEndpoint:inDevEndpoint},production:{title:prodTitle,body:prodBody,submitLabel:prodSubmitLabel,successMessage:prodSuccess,formspreeEndpoint:prodEndpoint}};if(!activeModal)return null;const imageMap={\"in-development\":inDevImage,production:prodImage};return /*#__PURE__*/_jsx(ModalPanel,{config:configs[activeModal],accentColor:accentColor||\"#FF1A1A\",onClose:close,image:imageMap[activeModal]},activeModal);}addPropertyControls(BBTVModals,{inDevImage:{type:ControlType.Image,title:\"InDev: Image\"},inDevTitle:{type:ControlType.String,title:\"InDev: Title\",defaultValue:\"Request Access to BlackBoxTV Development Slate\"},inDevBody:{type:ControlType.String,title:\"InDev: Body\",defaultValue:\"To explore our latest projects in development, enter your email and we'll send you access details.\"},inDevSubmitLabel:{type:ControlType.String,title:\"InDev: Button\",defaultValue:\"Request Access\"},inDevSuccess:{type:ControlType.String,title:\"InDev: Success Msg\",defaultValue:\"Thanks — we'll be in touch soon.\"},inDevEndpoint:{type:ControlType.String,title:\"InDev: Formspree URL\",defaultValue:\"\"},prodImage:{type:ControlType.Image,title:\"Prod: Image\"},prodTitle:{type:ControlType.String,title:\"Prod: Title\",defaultValue:\"Work With Us\"},prodBody:{type:ControlType.String,title:\"Prod: Body\",defaultValue:\"Have a story, project, or production inquiry? Submit your email to request a meeting with the BlackBoxTV production team.\"},prodSubmitLabel:{type:ControlType.String,title:\"Prod: Button\",defaultValue:\"Request Meeting\"},prodSuccess:{type:ControlType.String,title:\"Prod: Success Msg\",defaultValue:\"Thanks — we'll be in touch soon.\"},prodEndpoint:{type:ControlType.String,title:\"Prod: Formspree URL\",defaultValue:\"\"},accentColor:{type:ControlType.Color,title:\"Accent Color\",defaultValue:\"#FF1A1A\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BBTVModals\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BBTVModals.map"],"mappings":"wNACA,SAAS,EAAY,CAAC,YAAU,CAA8C,OAA1C,OAAO,SAAW,IAAmB,KAAyB,EAAS,aAAa,EAAS,SAAS,KAAK,CAAE,SAAS,EAAW,CAAC,SAAO,cAAY,UAAQ,SAAO,CAAC,GAAK,CAAC,EAAM,GAAUA,EAAS,GAAG,CAAM,CAAC,EAAS,GAAaA,EAAS,GAAG,CAC9Q,CAAC,EAAO,GAAWA,EAAS,OAAO,CAAM,CAAC,EAAS,GAAaA,EAAS,GAAG,CAClF,MAAc,CAAC,IAAM,EAAQ,GAAG,CAAI,EAAE,MAAM,UAAS,GAAS,EAA8C,OAA3C,EAAO,iBAAiB,UAAU,EAAQ,KAAW,EAAO,oBAAoB,UAAU,EAAQ,EAAG,CAAC,EAAQ,CAAC,CAAC,IAAM,EAAa,KAAM,IAAG,CAAoB,GAAnB,EAAE,gBAAgB,CAAI,EAAS,CAAC,EAAU,UAAU,CAAC,OAAY,KAAM,MAAM,CAA6B,CAArB,EAAU,UAAU,CAAC,EAAY,GAAG,CAAC,GAAG,CAAC,IAAM,EAAS,EAAO,mBAAmB,GAAG,GAAG,CAAC,EAAS,CAAC,EAAU,UAAU,CAAC,QAAkB,MAAM,MAAM,EAAS,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,mBAAmB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