{"version":3,"file":"PMCVideoModal.BV5pl9PR.mjs","names":["useState","startTransition"],"sources":["https:/framerusercontent.com/modules/Ey1Vp1Dd4PXuIA4bKM22/KCBDFyprdiZs420CIHFN/PMCVideoModal.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerIntrinsicWidth 250\n * @framerIntrinsicHeight 48\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function PMCVideoModal(props){const{label=\"Watch the Patient Journey\",videoUrl=\"https://customer-o2j9pgbomt01y7rd.cloudflarestream.com/691802956a4fae1d263eb4b435e861f4/iframe\",buttonColor=\"#CBA45A\",textColor=\"#FFFFFF\",style}=props;const[open,setOpen]=useState(false);const isStatic=useIsStaticRenderer();useEffect(()=>{if(isStatic||!open||typeof window===\"undefined\")return;const onKey=event=>{if(event.key===\"Escape\")startTransition(()=>setOpen(false));};window.addEventListener(\"keydown\",onKey);return()=>window.removeEventListener(\"keydown\",onKey);},[open,isStatic]);const playerUrl=videoUrl.includes(\"?\")?`${videoUrl}&autoplay=true&controls=true`:`${videoUrl}?autoplay=true&controls=true`;return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",...style},children:[/*#__PURE__*/_jsxs(\"button\",{type:\"button\",\"aria-label\":label,onClick:isStatic?undefined:()=>startTransition(()=>setOpen(true)),style:{width:\"100%\",minHeight:48,padding:\"13px 20px\",border:\"1px solid rgba(255,255,255,0.42)\",borderRadius:4,background:buttonColor,color:textColor,cursor:\"pointer\",fontFamily:\"Inter, sans-serif\",fontSize:14,fontWeight:600,letterSpacing:\"-0.01em\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",gap:10},children:[/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{fontSize:12,lineHeight:1},children:\"▶\"}),/*#__PURE__*/_jsx(\"span\",{children:label})]}),!isStatic&&open&&/*#__PURE__*/_jsx(\"div\",{role:\"dialog\",\"aria-modal\":\"true\",\"aria-label\":label,onClick:()=>startTransition(()=>setOpen(false)),style:{position:\"fixed\",inset:0,zIndex:9999,padding:\"clamp(18px, 5vw, 72px)\",background:\"rgba(4, 18, 24, 0.92)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsxs(\"div\",{onClick:event=>event.stopPropagation(),style:{position:\"relative\",width:\"min(1120px, 100%)\",aspectRatio:\"16 / 9\",borderRadius:12,overflow:\"hidden\",background:\"#000\",boxShadow:\"0 30px 90px rgba(0,0,0,0.45)\"},children:[/*#__PURE__*/_jsx(\"iframe\",{src:playerUrl,title:label,allow:\"accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture\",allowFullScreen:true,style:{width:\"100%\",height:\"100%\",border:0}}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"Close video\",onClick:()=>startTransition(()=>setOpen(false)),style:{position:\"absolute\",top:12,right:12,width:40,height:40,border:\"1px solid rgba(255,255,255,0.55)\",borderRadius:999,background:\"rgba(0,0,0,0.62)\",color:\"#fff\",cursor:\"pointer\",fontSize:22,lineHeight:1},children:\"\\xd7\"})]})})]});}addPropertyControls(PMCVideoModal,{label:{type:ControlType.String,title:\"Button Label\",defaultValue:\"Watch the Patient Journey\"},videoUrl:{type:ControlType.String,title:\"Cloudflare URL\",defaultValue:\"https://customer-o2j9pgbomt01y7rd.cloudflarestream.com/691802956a4fae1d263eb4b435e861f4/iframe\"},buttonColor:{type:ControlType.Color,title:\"Button\",defaultValue:\"#CBA45A\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#FFFFFF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PMCVideoModal\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\",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