(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,16515,e=>{"use strict";e.s(["Layers",()=>t],16515);let t=(0,e.i(4668).default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]])},51338,e=>{"use strict";e.s(["BookOpen",()=>t],51338);let t=(0,e.i(4668).default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])},36736,e=>{"use strict";e.s(["Calendar",()=>t],36736);let t=(0,e.i(4668).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},42022,e=>{"use strict";e.s(["Newspaper",()=>t],42022);let t=(0,e.i(4668).default)("newspaper",[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]])},18649,28802,825,46068,e=>{"use strict";e.s(["Church",()=>a],18649);var t=e.i(4668);let a=(0,t.default)("church",[["path",{d:"M10 9h4",key:"u4k05v"}],["path",{d:"M12 7v5",key:"ma6bk"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"m18 9 3.52 2.147a1 1 0 0 1 .48.854V19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-6.999a1 1 0 0 1 .48-.854L6 9",key:"flvdwo"}],["path",{d:"M6 21V7a1 1 0 0 1 .376-.782l5-3.999a1 1 0 0 1 1.249.001l5 4A1 1 0 0 1 18 7v14",key:"a5i0n2"}]]);e.s(["User",()=>s],28802);let s=(0,t.default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["LayoutGrid",()=>r],825);let r=(0,t.default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);e.s(["List",()=>l],46068);let l=(0,t.default)("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]])},68164,e=>{"use strict";e.s(["LibraryBrowser",()=>k],68164);var t=e.i(10725),a=e.i(72600),s=e.i(51338),r=e.i(18649),l=e.i(16515),i=e.i(4668);let d=(0,i.default)("library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]),n=(0,i.default)("scroll-text",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);var o=e.i(28802),c=e.i(42022),h=e.i(36736);let x=(0,i.default)("book",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);var m=e.i(825),b=e.i(46068),p=e.i(41052),g=e.i(57711),u=e.i(22910),y=e.i(74422);let j=(0,i.default)("file-down",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);function f(e){let{item:a}=e,r=(0,t.jsxs)("div",{className:"group",children:[(0,t.jsx)("div",{className:"relative w-full",style:{aspectRatio:"1 / 1"},children:(0,t.jsxs)("div",{className:"absolute inset-0 ".concat(a.color," shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-2 overflow-hidden"),style:{borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",borderTopRightRadius:"16px",borderBottomRightRadius:"16px"},children:[(0,t.jsx)("div",{className:"absolute left-3 top-0 bottom-0 w-3 bg-gradient-to-r from-black/15 to-transparent"}),(0,t.jsx)("div",{className:"absolute left-5 top-0 bottom-0 w-2 bg-gradient-to-r from-white/20 to-transparent"}),(0,t.jsx)("div",{className:"absolute top-0 left-0 right-0 h-6 bg-gradient-to-b from-white/15 to-transparent"}),(0,t.jsx)("div",{className:"absolute right-0 top-0 bottom-0 w-4 bg-gradient-to-l from-black/10 to-transparent"}),(0,t.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-4 bg-gradient-to-t from-black/6 to-transparent"}),(0,t.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center p-4 md:p-6 gap-2 pl-6 md:pl-8",children:[(0,t.jsx)("h3",{className:"text-base md:text-lg lg:text-xl font-bold text-brand-dark text-center leading-tight group-hover:scale-105 transition-transform duration-300",children:a.title}),a.author&&(0,t.jsx)("p",{className:"text-xs md:text-sm text-brand-gray font-medium text-center",children:a.author})]}),(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-white/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none"})]})}),(0,t.jsxs)("div",{className:"mt-4 space-y-2",children:[a.description&&(0,t.jsx)("p",{className:"text-xs md:text-sm text-brand-gray line-clamp-2",children:a.description}),(0,t.jsx)("div",{className:"pt-2",children:(0,t.jsx)("span",{className:"inline-flex items-center gap-2 text-xs md:text-sm font-semibold text-brand-dark group-hover:text-brand-blue transition-colors",children:"pdf"===a.type?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j,{className:"w-4 h-4"}),"PDF herunterladen"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.BookOpen,{className:"w-4 h-4"}),"Lesen",(0,t.jsx)("span",{className:"group-hover:translate-x-1 transition-transform",children:"→"})]})})})]})]});return a.file?(0,t.jsx)("a",{href:a.file,target:"_blank",rel:"noopener noreferrer",children:r}):a.link?(0,t.jsx)(u.Link,{href:a.link,children:r}):r}let v={user:o.User,"book-open":s.BookOpen,scroll:n,church:r.Church,library:d,newspaper:c.Newspaper,calendar:h.Calendar,book:x};function k(e){var s;let{categories:r,initialCategory:i}=e,d=(0,y.useTranslations)("library.sidebar"),n=(0,u.useRouter)(),o=(0,g.useSearchParams)(),c=(0,a.useMemo)(()=>new Set(r.map(e=>e.id)),[r]),[h,x]=(0,a.useState)(()=>i&&c.has(i)?i:"all"),[j,k]=(0,a.useState)(()=>{{let e=localStorage.getItem("library-view-mode");if("grid"===e||"list"===e)return e}return"grid"}),[N,w]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=o.get("category");e&&c.has(e)?x(e):x("all")},[o,c]),(0,a.useEffect)(()=>{localStorage.setItem("library-view-mode",j)},[j]);let M=e=>{x(e);let t=new URLSearchParams(o.toString());"all"===e?t.delete("category"):t.set("category",e);let a=t.toString()?"?".concat(t.toString()):"/library";n.push(a,{scroll:!1})},L="all"===h?r:r.filter(e=>e.id===h);return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"container mx-auto px-4 py-8 relative z-10",children:[(0,t.jsxs)("div",{className:"flex gap-8 items-start",children:[(0,t.jsx)("aside",{className:"hidden lg:block w-64 flex-shrink-0",children:(0,t.jsxs)("div",{className:"sticky top-24 space-y-2",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold uppercase tracking-wide text-brand-gray px-3 mb-4",children:d("title")}),(0,t.jsxs)("button",{onClick:()=>M("all"),className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-left transition-colors cursor-pointer ".concat("all"===h?"bg-brand-blue text-brand-white":"text-brand-gray hover:text-brand-blue"),children:[(0,t.jsx)(l.Layers,{className:"w-5 h-5"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:d("all")})]}),r.map(e=>{let a=v[e.icon];return(0,t.jsxs)("button",{onClick:()=>M(e.id),className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-left transition-colors cursor-pointer ".concat(h===e.id?"bg-brand-blue text-brand-white":"text-brand-gray hover:text-brand-blue"),children:[(0,t.jsx)(a,{className:"w-5 h-5"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:e.title})]},e.id)})]})}),(0,t.jsxs)("div",{className:"lg:hidden w-full",children:[(0,t.jsxs)("div",{className:"relative mb-4",children:[(0,t.jsxs)("button",{onClick:()=>w(!N),className:"w-full flex items-center justify-between gap-3 px-4 py-3 bg-brand-white border border-brand-light rounded-lg shadow-sm hover:shadow-md transition-all",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:["all"===h?(0,t.jsx)(l.Layers,{className:"w-5 h-5 text-brand-gray"}):(()=>{let e=r.find(e=>e.id===h),a=e?v[e.icon]:l.Layers;return(0,t.jsx)(a,{className:"w-5 h-5 text-brand-gray"})})(),(0,t.jsx)("span",{className:"text-brand-dark font-medium",children:"all"===h?d("all"):(null==(s=r.find(e=>e.id===h))?void 0:s.title)||d("all")})]}),(0,t.jsx)(p.ChevronDown,{className:"w-5 h-5 text-brand-gray transition-transform ".concat(N?"rotate-180":"")})]}),N&&(0,t.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-brand-white border border-brand-light rounded-lg shadow-lg z-20 overflow-hidden",children:[(0,t.jsxs)("button",{onClick:()=>{M("all"),w(!1)},className:"w-full flex items-center gap-3 px-4 py-3 text-left transition-colors ".concat("all"===h?"bg-brand-blue text-brand-white":"text-brand-gray hover:bg-brand-light"),children:[(0,t.jsx)(l.Layers,{className:"w-5 h-5"}),(0,t.jsx)("span",{className:"font-medium",children:d("all")})]}),r.map(e=>{let a=v[e.icon];return(0,t.jsxs)("button",{onClick:()=>{M(e.id),w(!1)},className:"w-full flex items-center gap-3 px-4 py-3 text-left transition-colors ".concat(h===e.id?"bg-brand-blue text-brand-white":"text-brand-gray hover:bg-brand-light"),children:[(0,t.jsx)(a,{className:"w-5 h-5"}),(0,t.jsx)("span",{className:"font-medium",children:e.title})]},e.id)})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 mb-6",children:[(0,t.jsx)("button",{onClick:()=>k("grid"),className:"p-3 rounded-lg transition-colors ".concat("grid"===j?"bg-brand-blue text-brand-white":"text-brand-gray hover:bg-brand-light bg-brand-white border border-brand-light"),title:"Grid View",children:(0,t.jsx)(m.LayoutGrid,{className:"w-5 h-5"})}),(0,t.jsx)("button",{onClick:()=>k("list"),className:"p-3 rounded-lg transition-colors ".concat("list"===j?"bg-brand-blue text-brand-white":"text-brand-gray hover:bg-brand-light bg-brand-white border border-brand-light"),title:"List View",children:(0,t.jsx)(b.List,{className:"w-5 h-5"})})]})]}),(0,t.jsx)("main",{className:"flex-1 min-w-0 hidden lg:block",children:(0,t.jsx)("div",{className:"space-y-16",children:L.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-2",children:[(0,t.jsx)("h2",{className:"text-3xl md:text-4xl text-brand-dark flex-1",children:e.title}),0===a&&(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0 pt-1",children:[(0,t.jsx)("button",{onClick:()=>k("grid"),className:"p-2 rounded-lg transition-colors ".concat("grid"===j?"bg-brand-blue text-brand-white":"text-brand-gray hover:bg-brand-light"),title:"Grid View",children:(0,t.jsx)(m.LayoutGrid,{className:"w-5 h-5"})}),(0,t.jsx)("button",{onClick:()=>k("list"),className:"p-2 rounded-lg transition-colors ".concat("list"===j?"bg-brand-blue text-brand-white":"text-brand-gray hover:bg-brand-light"),title:"List View",children:(0,t.jsx)(b.List,{className:"w-5 h-5"})})]})]}),(0,t.jsx)("p",{className:"text-brand-gray text-lg",children:e.description})]}),"grid"===j?(0,t.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 md:gap-6",children:e.items.map(e=>(0,t.jsx)(f,{item:e},e.id))}):(0,t.jsx)("div",{className:"space-y-2",children:e.items.map(a=>{let s=v[e.icon];return(0,t.jsx)(u.Link,{href:a.link||"#",className:"block group",children:(0,t.jsx)("div",{className:"bg-brand-white rounded-lg p-4 shadow-sm hover:shadow-md transition-all duration-200 border border-brand-light hover:border-brand-blue/30",children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-12 h-14 rounded ".concat(a.color||"bg-brand-blue"," flex items-center justify-center"),children:(0,t.jsx)(s,{className:"w-6 h-6 text-brand-white"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"text-lg font-headline font-bold text-brand-dark group-hover:text-brand-blue transition-colors",children:a.title}),(a.author||a.description)&&(0,t.jsxs)("p",{className:"text-sm text-brand-gray mt-0.5",children:[a.author&&(0,t.jsx)("span",{children:a.author}),a.author&&a.description&&(0,t.jsx)("span",{className:"mx-2",children:"•"}),a.description&&(0,t.jsx)("span",{children:a.description})]})]})]})})},a.id)})})]},e.id))})})]}),(0,t.jsx)("div",{className:"lg:hidden px-4 pb-24 relative z-10",children:(0,t.jsx)("div",{className:"space-y-16",children:L.map(e=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-3xl md:text-4xl text-brand-dark mb-2",children:e.title}),(0,t.jsx)("p",{className:"text-brand-gray text-lg",children:e.description})]}),"grid"===j?(0,t.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 md:gap-6",children:e.items.map(e=>(0,t.jsx)(f,{item:e},e.id))}):(0,t.jsx)("div",{className:"space-y-2",children:e.items.map(a=>{let s=v[e.icon];return(0,t.jsx)(u.Link,{href:a.link||"#",className:"block group",children:(0,t.jsx)("div",{className:"bg-brand-white rounded-lg p-4 shadow-sm hover:shadow-md transition-all duration-200 border border-brand-light hover:border-brand-blue/30",children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-12 h-14 rounded ".concat(a.color||"bg-brand-blue"," flex items-center justify-center"),children:(0,t.jsx)(s,{className:"w-6 h-6 text-brand-white"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"text-lg font-headline font-bold text-brand-dark group-hover:text-brand-blue transition-colors",children:a.title}),(a.author||a.description)&&(0,t.jsxs)("p",{className:"text-sm text-brand-gray mt-0.5",children:[a.author&&(0,t.jsx)("span",{children:a.author}),a.author&&a.description&&(0,t.jsx)("span",{className:"mx-2",children:"•"}),a.description&&(0,t.jsx)("span",{children:a.description})]})]})]})})},a.id)})})]},e.id))})})]})})}}]);