import{B as e,C as t,G as n,S as r,T as i,ft as a,l as o,m as s,o as c,r as l,s as u,u as d,x as f}from"./runtime-core.esm-bundler-DTXUv7Wx.js";import{o as p}from"./vue-router-Cyqru1db.js";import{t as m}from"./i18n-DK-nbHGh.js";import{r as h}from"./products-BqW5PUnm.js";import{c as g,d as _,f as v,p as y,u as b}from"./api-DlB23x7f.js";import{t as x}from"./Navbar-BBjFbxqT.js";import{t as S}from"./CartDrawer-Bq07KOTX.js";import{t as C}from"./Footer-C6UzF-Nr.js";var w={class:`bg-cream text-ink min-h-svh`},T={class:`mx-auto w-full max-w-3xl px-6 py-14 sm:px-8 sm:py-16 md:px-12 md:py-20 lg:px-16 lg:py-24`},E={class:`flex flex-col gap-3 mb-10 md:mb-14`},D={class:`eyebrow`},O={class:`font-display font-normal leading-[1.05] tracking-tight text-ink text-headline-md`},k={key:0,class:`text-[12px] text-muted`},A={class:`flex flex-col gap-10`},j=[`id`],M={class:`font-display text-xl md:text-2xl font-normal text-brand leading-tight`},N={class:`text-[15px] leading-relaxed text-ink whitespace-pre-line`},P={__name:`LegalPage`,props:{kind:{type:String,required:!0,validator:e=>[`impressum`,`datenschutz`].includes(e)}},setup(P){let F=P,{t:I}=m(),L=y(),R=p(),z=e(!1);function B(){z.value=!1,R.push(`/checkout`)}let V=[{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`}],H=[],U={impressum:[`operator`,`contact`,`register`,`vat`,`authority`,`liability`,`copyright`],datenschutz:[`controller`,`scope`,`legalBasis`,`data`,`cookies`,`analytics`,`payments`,`rights`,`retention`,`contact`]},W=c(()=>U[F.kind].map(e=>({id:e,heading:I(`legal.${F.kind}.section.${e}.heading`),body:I(`legal.${F.kind}.section.${e}.body`)}))),G=c(()=>I(`legal.${F.kind}.updated`));async function K(e){await g(e.id,1),z.value=!0}async function q({productId:e,quantity:t}){await v(e,t)}async function J(e){await _(e)}let Y=e(null),X=null;function Z(){let e=Y.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`)}return r(()=>{if(b(),Z(),typeof ResizeObserver<`u`&&Y.value){let e=Y.value.$el||Y.value;X=new ResizeObserver(Z),X.observe(e)}window.addEventListener(`resize`,Z)}),f(()=>{X&&X.disconnect(),typeof window<`u`&&window.removeEventListener(`resize`,Z)}),(e,r)=>(t(),d(l,null,[s(x,{ref_key:`navRef`,ref:Y,variant:`cream`,layout:`standard`,items:V,"secondary-items":H,"cart-count":n(L).count,products:n(h),onCart:r[0]||=e=>z.value=!0,onSearch:K},null,8,[`cart-count`,`products`]),u(`main`,w,[u(`div`,T,[u(`header`,E,[u(`p`,D,a(n(I)(`legal.${P.kind}.eyebrow`)),1),u(`h1`,O,a(n(I)(`legal.${P.kind}.title`)),1),G.value?(t(),d(`p`,k,a(G.value),1)):o(``,!0)]),u(`article`,A,[(t(!0),d(l,null,i(W.value,e=>(t(),d(`section`,{id:e.id,key:e.id,class:`flex flex-col gap-3`},[u(`h2`,M,a(e.heading),1),u(`p`,N,a(e.body),1)],8,j))),128))])])]),s(C),r[2]||=u(`div`,{"aria-hidden":`true`,class:`md:hidden`,style:{height:`calc(64px + env(safe-area-inset-bottom))`}},null,-1),s(S,{modelValue:z.value,"onUpdate:modelValue":r[1]||=e=>z.value=e,items:n(L).items,subtotal:n(L).subtotal,count:n(L).count,onUpdateQuantity:q,onRemove:J,onCheckout:B},null,8,[`modelValue`,`items`,`subtotal`,`count`])],64))}};export{P as default};