import{o as e}from"./rolldown-runtime-iuO8RvI4.js";import{Mi as a,ji as o,ki as s}from"./vendor-frame-CwiylG4Y.js";import{Ih as t}from"./shared-1-3-6x7RKF.js";import{J as n,X as r}from"./shared-frame-DbQbH4Yr.js";import{_n as l,gn as i}from"./shared-4-6CEyRAHb.js";var c=e(a()),m=e(o()),d=s();function f({assetId:e,onClose:a}){const o=(0,c.useRef)(null),s=(0,c.useRef)(null),f=r(50);return(0,c.useEffect)(()=>(s.current=document.activeElement,o.current?.focus(),document.body.style.overflow="hidden",()=>{document.body.style.overflow="";const e=s.current;e instanceof HTMLElement&&e.focus()}),[]),(0,m.createPortal)((0,d.jsx)("div",{ref:o,role:"dialog","aria-modal":"true","aria-label":"Video player",tabIndex:-1,className:"fixed inset-0 flex items-center justify-center bg-always-black/60 backdrop-blur-sm animate-[fade-in_200ms_ease-out] draggable-none outline-none",style:{zIndex:f},onClick:a,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),a())},children:(0,d.jsxs)(n,{children:[(0,d.jsx)("style",{children:"\n        @keyframes fade-in {\n          from { opacity: 0; }\n          to { opacity: 1; }\n        }\n        @keyframes scale-in {\n          from { opacity: 0; transform: scale(0.95); }\n          to { opacity: 1; transform: scale(1); }\n        }\n      "}),(0,d.jsx)("button",{onClick:a,"aria-label":"Close video",className:"absolute top-6 right-6 text-always-white/80 hover:text-always-white transition-colors",children:(0,d.jsx)(t,{size:24})}),(0,d.jsx)("div",{role:"presentation",className:"relative w-full max-w-[800px] mx-4 rounded-sm overflow-hidden shadow-[0_20px_60px_hsl(var(--always-black)/40%)] animate-[scale-in_250ms_ease-out]",onClick:e=>e.stopPropagation(),children:(0,d.jsx)(l,{asset:i[e],autoPlay:!0,controls:!0,playsInline:!0,className:"w-full h-auto"})})]})}),document.body)}export{f as t};