{"version":3,"file":"CorporateVideoModal.BUsQjBS9.mjs","names":["useState","useRef","__esmMin","_e","p","c","init_jsx_runtime","ce","init_npm_react_18_3_1","de","init_framer_DKgW_P28","addPropertyControls","ControlType","init_PlayVideoButtonPulse","VideoPlayer","CorporateVideoModal","VIDEO","props","open","setOpen","dlg","closeBtn","vid","d","background","accentColor","CSS","poster","POSTER","buttonText","video","videoUrl","init_CorporateVideoModal"],"sources":["https:/framerusercontent.com/modules/Vlo2O3K2oXxe6SVZCjVJ/bJef4DJPEWvuRkc2JU4Z/CorporateVideoModal.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{VideoPlayer}from\"https://framerusercontent.com/modules/5kK1BIbT0GVJeRCoKVVl/nVqDhXHIQ5IJa65Zqvty/PlayVideoButtonPulse.js\";// Defaults = Greenwave's official corporate film. A Video file (Framer-hosted) replaces the YouTube iframe with the\n// shared laser-bar VideoPlayer from PlayVideoButtonPulse (Home §03 popup style, 1280 dialog).\n// Default poster = Greenwave Water-Guided Laser (SDM-50) micro-machining beam in live operation.\nconst POSTER=\"https://framerusercontent.com/images/0YzGtvnV0BKXJEvJ6nLdP2RsfE.png\";const VIDEO=\"https://www.youtube-nocookie.com/embed/LNvLWUsKodc?autoplay=1&rel=0\";// Reference: synova.ch/about-us video band — full-bleed, 780px tall at every width,\n// page-coloured corners (the reference SVGs: 148x378 top-right, 378x148\n// bottom-left; 90x230 / 230x90 below 1240, measured on /about-us and /semiconductors). Desktop play control is a pill with\n// an 80px disc + label; below 1024 only the disc. Container queries, canvas-safe.\nconst CSS=`\n.cv{container-type:inline-size;width:100%;font-family:'Inter',sans-serif}\n.cv-band{position:relative;width:100%;height:780px;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;overflow:hidden}\n.cv-band::before{content:\"\";position:absolute;inset:0;background:rgba(0,20,45,.45)}\n.cv-c{position:absolute;display:block;fill:var(--bg)}\n.cv-tr{top:-1px;right:-1px;width:148px;height:378px}\n.cv-bl{bottom:-1px;left:-1px;width:378px;height:148px}\n.cv-play{position:relative;z-index:1;display:inline-flex;align-items:center;gap:18px;padding:22px 32px 22px 22px;border:0;border-radius:999px;background:rgba(0,20,45,.55);color:#fff;font:500 19px/1.2 'Inter',sans-serif;cursor:pointer;transition:transform .2s ease}\n.cv-play:hover{transform:scale(1.04)}\n.cv-play:focus-visible{outline:3px solid #fff;outline-offset:4px}\n.cv-disc{position:relative;width:80px;height:80px;border-radius:50%;background:var(--acc);display:flex;align-items:center;justify-content:center}\n.cv-disc::before,.cv-disc::after{content:\"\";position:absolute;inset:-20px;border-radius:50%;border:1px solid var(--acc);opacity:0;animation:cv-pulse 1.5s linear infinite}\n.cv-disc::after{animation-delay:.5s}\n@keyframes cv-pulse{0%{transform:scale(.6);opacity:0}50%{opacity:1}100%{transform:scale(1);opacity:0}}\n@media (prefers-reduced-motion:reduce){.cv-disc::before,.cv-disc::after{animation:none;opacity:.6}}\n.cv-dlg{width:min(960px,calc(100vw - 32px));max-width:none;padding:0;border:0;border-radius:16px;background:#000;overflow:hidden}\n.cv-dlg-v{width:min(1280px,calc(100vw - 32px));max-height:none}\n.cv-dlg-v video{max-height:calc(100vh - 32px)}\n.cv-dlg::backdrop{background:rgba(0,0,0,.85)}\n.cv-dlg iframe{display:block;width:100%;aspect-ratio:16/9;border:0}\n.cv-x{position:absolute;top:12px;right:12px;z-index:1;width:40px;height:40px;border-radius:50%;border:1px solid rgba(255,255,255,.25);background:rgba(0,0,0,.6);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}\n@container (max-width:1239.98px){.cv-tr{width:90px;height:230px}.cv-bl{width:230px;height:90px}}\n@container (max-width:1023.98px){.cv-play{padding:0;background:none}.cv-label{display:none}}\n`;/**\n * @framerSupportedLayoutWidth 100%\n * @framerSupportedLayoutHeight auto\n */export default function CorporateVideoModal(props){const{poster,video,videoUrl=VIDEO,accentColor=\"#00923F\",buttonText=\"Play video\",background=\"#FFFFFF\"}=props;const[open,setOpen]=useState(false);const dlg=useRef(null);const closeBtn=useRef(null);const vid=useRef(null);useEffect(()=>{const d=dlg.current;if(!d)return;if(open&&!d.open){d.showModal();closeBtn.current?.focus();}else if(!open&&d.open)d.close();},[open]);return /*#__PURE__*/_jsxs(\"div\",{className:\"cv\",style:{\"--bg\":background,\"--acc\":accentColor},children:[/*#__PURE__*/_jsx(\"style\",{children:CSS}),/*#__PURE__*/_jsxs(\"div\",{className:\"cv-band\",style:{backgroundImage:`url(${poster?.src||POSTER})`},children:[/*#__PURE__*/_jsx(\"svg\",{className:\"cv-c cv-tr\",viewBox:\"0 0 148 378\",preserveAspectRatio:\"none\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M30 308C30 330.09 47.91 348 70 348H117C133.57 348 147 361.43 147 378H148V0H0V1C16.57 1 30 14.43 30 31Z\"})}),/*#__PURE__*/_jsx(\"svg\",{className:\"cv-c cv-bl\",viewBox:\"0 0 378 148\",preserveAspectRatio:\"none\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M308 30C330.09 30 348 47.91 348 70V117C348 133.57 361.43 147 378 147V148H0V0H1C1 16.57 14.43 30 31 30Z\"})}),/*#__PURE__*/_jsxs(\"button\",{type:\"button\",className:\"cv-play\",onClick:()=>{setOpen(true);vid.current?.play().catch(()=>{});// same gesture, so it may play with sound\n},\"aria-haspopup\":\"dialog\",\"aria-label\":buttonText,children:[/*#__PURE__*/_jsx(\"span\",{className:\"cv-disc\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"svg\",{width:\"30\",height:\"30\",viewBox:\"0 0 24 24\",fill:\"#fff\",style:{marginLeft:5},children:/*#__PURE__*/_jsx(\"path\",{d:\"M8 5v14l11-7z\"})})}),/*#__PURE__*/_jsx(\"span\",{className:\"cv-label\",children:buttonText})]})]}),/*#__PURE__*/_jsxs(\"dialog\",{ref:dlg,className:video?\"cv-dlg cv-dlg-v\":\"cv-dlg\",\"aria-label\":buttonText,onClose:()=>{setOpen(false);vid.current?.pause();},onClick:e=>e.target===e.currentTarget&&setOpen(false),children:[/*#__PURE__*/_jsx(\"button\",{ref:closeBtn,type:\"button\",className:\"cv-x\",\"aria-label\":\"Close video\",onClick:()=>setOpen(false),children:/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M18 6 6 18M6 6l12 12\"})})}),video?/*#__PURE__*/_jsx(VideoPlayer,{ref:vid,src:video,poster:poster?.src||POSTER}):open&&/*#__PURE__*/_jsx(\"iframe\",{src:videoUrl,title:buttonText,allow:\"autoplay; encrypted-media; picture-in-picture\",allowFullScreen:true})]})]});}addPropertyControls(CorporateVideoModal,{poster:{type:ControlType.ResponsiveImage,title:\"Poster\"},video:{type:ControlType.File,title:\"Video\",allowedFileTypes:[\"mp4\",\"webm\",\"mov\"]},videoUrl:{type:ControlType.String,title:\"Video URL\",defaultValue:VIDEO},buttonText:{type:ControlType.String,title:\"Button Text\",defaultValue:\"Play video\"},accentColor:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#00923F\"},background:{type:ControlType.Color,title:\"Page Background\",defaultValue:\"#FFFFFF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CorporateVideoModal\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"100%\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CorporateVideoModal.map"],"mappings":"A,8PAiCG,SAAwBe,EAAoB,EAAM,CAAC,GAAK,CAAC,SAAO,QAAM,WAASC,EAAM,cAAY,UAAU,aAAW,aAAa,aAAW,WAAWC,EAAW,CAACC,EAA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