import{B as e,C as t,G as n,S as r,c as i,ft as a,i as o,j as s,l as c,m as l,o as u,r as d,s as f,u as p,x as m}from"./runtime-core.esm-bundler-DTXUv7Wx.js";import{s as h,t as g}from"./runtime-dom.esm-bundler-CXLmyuFK.js";import{o as ee}from"./vue-router-Cyqru1db.js";import{t as _}from"./IconButton-DXYRXEop.js";import{t as v}from"./i18n-DK-nbHGh.js";import{r as y}from"./products-BqW5PUnm.js";import{c as b,d as x,f as S,p as C,u as w}from"./api-DlB23x7f.js";import{n as T,t as E}from"./kaiserhacks-BNSWDqc4.js";import{t as D}from"./Navbar-BBjFbxqT.js";import{t as O}from"./CartDrawer-Bq07KOTX.js";import{t as k}from"./Footer-C6UzF-Nr.js";import{t as A}from"./Kaiserhacks-DdB5cxR4.js";var j=[`aria-label`],M={class:`relative w-full max-w-[360px] overflow-hidden rounded-md bg-paper shadow-lg`},N={class:`absolute right-3 top-3 z-10`},P={class:`relative aspect-video w-full overflow-hidden bg-ink`},F=[`src`,`alt`],I={class:`absolute inset-x-5 bottom-5`},te={class:`mb-3 flex items-center justify-between text-[12px] font-bold tracking-label text-cream`},L={class:`p-5`},R={class:`eyebrow mb-2`},z={class:`font-display text-2xl font-normal leading-tight text-ink`},B={class:`mt-2 text-sm leading-relaxed text-muted`},V={__name:`KaiserhacksPage`,setup(V){let{t:H}=v(),U=C(),W=ee(),G=e(!1),K=e(null),q=e(null),J=[{key:`nav.shop`,href:`/shop`},{key:`nav.bundles`,href:`/#bundles`},{key:`nav.revitalization`,href:`/#revitalize`},{key:`nav.about`,href:`/#about`},{key:`nav.kaiserhacks`,href:`/kaiserhacks`}],Y=[],X=u(()=>T(E,H)),Z=u(()=>({categories:H(`kaiserhacks.labels.categories`),categoryNav:H(`kaiserhacks.labels.categoryNav`),openVideo:H(`kaiserhacks.labels.openVideo`),mockPlayer:H(`kaiserhacks.labels.mockPlayer`),community:H(`kaiserhacks.labels.community`),handoffNote:H(`kaiserhacks.labels.handoffNote`)})),Q=null;function $(){let e=q.value,t=e&&(e.$el||e);if(!t||typeof window>`u`)return;let n=Math.round(t.getBoundingClientRect().height);document.documentElement.style.setProperty(`--nav-h`,`${n}px`)}function ne(){G.value=!1,W.push(`/checkout`)}async function re(e){await b(e.id,1),G.value=!0}function ie(e){K.value=e}async function ae({productId:e,quantity:t}){await S(e,t)}async function oe(e){await x(e)}return r(()=>{if(w(),$(),typeof ResizeObserver<`u`&&q.value){let e=q.value.$el||q.value;Q=new ResizeObserver($),Q.observe(e)}window.addEventListener(`resize`,$)}),m(()=>{Q&&Q.disconnect(),typeof window<`u`&&window.removeEventListener(`resize`,$)}),(e,r)=>(t(),p(d,null,[l(D,{ref_key:`navRef`,ref:q,variant:`brand`,layout:`standard`,items:J,"secondary-items":Y,"cart-count":n(U).count,products:n(y),onCart:r[0]||=e=>G.value=!0,onSearch:re},null,8,[`cart-count`,`products`]),l(A,{eyebrow:X.value.eyebrow,headline:X.value.headline,sub:X.value.sub,categories:X.value.categories,"instagram-href":X.value.instagramHref,labels:Z.value,onSelect:ie},null,8,[`eyebrow`,`headline`,`sub`,`categories`,`instagram-href`,`labels`]),l(k),(t(),i(o,{to:`body`},[l(g,{"enter-active-class":`transition duration-slow ease-out`,"enter-from-class":`opacity-0`,"enter-to-class":`opacity-100`,"leave-active-class":`transition duration-base ease-out`,"leave-from-class":`opacity-100`,"leave-to-class":`opacity-0`},{default:s(()=>[K.value?(t(),p(`div`,{key:0,class:`fixed inset-0 z-50 flex items-center justify-center bg-ink/70 px-4 py-8`,role:`dialog`,"aria-modal":`true`,"aria-label":K.value.title,onClick:r[2]||=h(e=>K.value=null,[`self`])},[f(`div`,M,[f(`div`,N,[l(_,{icon:`close`,variant:`float`,size:`sm`,"aria-label":n(H)(`menu.close`),onClick:r[1]||=e=>K.value=null},null,8,[`aria-label`])]),f(`div`,P,[f(`img`,{src:K.value.video?.poster,alt:K.value.video?.alt||K.value.title,class:`absolute inset-0 h-full w-full object-cover opacity-70`},null,8,F),r[5]||=f(`div`,{class:`absolute inset-0 bg-gradient-to-t from-ink/80 via-ink/25 to-transparent`},null,-1),r[6]||=f(`div`,{class:`absolute inset-0 flex items-center justify-center`},[f(`div`,{class:`flex h-16 w-16 items-center justify-center rounded-pill bg-accent text-brand shadow-md`},[f(`span`,{class:`ml-1 h-0 w-0 border-y-[12px] border-l-[18px] border-y-transparent border-l-current`})])],-1),f(`div`,I,[f(`div`,te,[f(`span`,null,a(n(H)(`kaiserhacks.labels.mockPlayer`)),1),f(`span`,null,a(K.value.duration),1)]),r[4]||=f(`div`,{class:`h-1.5 overflow-hidden rounded-pill bg-cream/25`},[f(`div`,{class:`h-full w-1/3 rounded-pill bg-accent`})],-1)])]),f(`div`,L,[f(`p`,R,a(n(H)(`nav.kaiserhacks`)),1),f(`h2`,z,a(K.value.title),1),f(`p`,B,a(K.value.description),1)])])],8,j)):c(``,!0)]),_:1})])),r[7]||=f(`div`,{"aria-hidden":`true`,class:`min-[1100px]:hidden bg-cream`,style:{height:`calc(100px + env(safe-area-inset-bottom))`}},null,-1),l(O,{modelValue:G.value,"onUpdate:modelValue":r[3]||=e=>G.value=e,items:n(U).items,subtotal:n(U).subtotal,count:n(U).count,onUpdateQuantity:ae,onRemove:oe,onCheckout:ne},null,8,[`modelValue`,`items`,`subtotal`,`count`])],64))}};export{V as default};