1import{c as D,ay as q,r as o,aB as Q,q as g,j as e,a1 as k,M as f,aw as C,Z as W,a6 as X,aE as Y,au as I,T as w,av as E,a4 as T,a7 as A,X as ee,aI as te}from"./index-CVYDnuXC.js";import{e as se}from"./eksternUrl-9sHWsDwf.js";import{F as re,E as m,D as ae}from"./FactStrip-ClOfbcqQ.js";import{B as le}from"./BookKnap-DH9GIOef.js";import{D as ne}from"./DetailHero-LAaJv_fh.js";import{M as ie}from"./MapEmbed-jw8cb0Nz.js";import{R as oe}from"./RelateredeEvents-B_iJEfa7.js";import{V as de}from"./VideoEmbed-CwRHDwQZ.js";import{T as ce}from"./TilgaengelighedBoks-CoEpPhBv.js";import{S as me}from"./SortSolInternBanner-OOwTYJY7.js";import{m as xe}from"./seoUtils-CHVwNGtn.js";import{i as he}from"./oversatAttr-Di17wh8o.js";import{C as ue}from"./circle-parking-C1UrxqwB.js";import"./share-2-CjtSto9E.js";import"./circle-check-big-C1mClK-Z.js";/** 2 * @license lucide-react v0.475.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const ge=[["path",{d:"m12 8 6-3-6-3v10",key:"mvpnpy"}],["path",{d:"m8 11.99-5.5 3.14a1 1 0 0 0 0 1.74l8.5 4.86a2 2 0 0 0 2 0l8.5-4.86a1 1 0 0 0 0-1.74L16 12",key:"ek95tt"}],["path",{d:"m6.49 12.85 11.02 6.3",key:"1kt42w"}],["path",{d:"M17.51 12.85 6.5 19.15",key:"v55bdg"}]],M=D("LandPlot",ge);/** 7 * @license lucide-react v0.475.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const fe=[["circle",{cx:"11",cy:"4",r:"2",key:"vol9p0"}],["circle",{cx:"18",cy:"8",r:"2",key:"17gozi"}],["circle",{cx:"20",cy:"16",r:"2",key:"1v9bxh"}],["path",{d:"M9 10a5 5 0 0 1 5 5v3.5a3.5 3.5 0 0 1-6.84 1.045Q6.52 17.48 4.46 16.84A3.5 3.5 0 0 1 5.5 10Z",key:"1ydw1z"}]],F=D("PawPrint",fe);function pe({images:r,startIndex:v,onClose:c}){const[t,a]=o.useState(v);return o.useEffect(()=>{const l=d=>{d.key==="Escape"&&c(),d.key==="ArrowRight"&&a(x=>(x+1)%r.length),d.key==="ArrowLeft"&&a(x=>(x-1+r.length)%r.length)};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[r,c]),e.jsxs(A.div,{initial:{opacity:0}
11,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/95 flex items-center justify-center",onClick:c,children:[e.jsx("button",{onClick:c,className:"absolute top-4 right-4 text-white/70 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors",children:e.jsx(ee,{className:"w-6 h-6"})}),e.jsx("button",{onClick:l=>{l.stopPropagation(),a(d=>(d-1+r.length)%r.length)},className:"absolute left-4 top-1/2 -translate-y-1/2 text-white/70 hover:text-white p-3 rounded-full hover:bg-white/10 transition-colors",children:e.jsx(te,{className:"w-7 h-7"})}),e.jsx(A.img,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.25},src:r[t],alt:"",className:"max-h-[85vh] max-w-[85vw] object-contain rounded-xl shadow-2xl",onClick:l=>l.stopPropagation()},t),e.jsx("button",{onClick:l=>{l.stopPropagation(),a(d=>(d+1)%r.length)},className:"absolute right-4 top-1/2 -translate-y-1/2 text-white/70 hover:text-white p-3 rounded-full hover:bg-white/10 transition-colors",children:e.jsx(w,{className:"w-7 h-7"})}),e.jsxs("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 text-white/50 text-sm",children:[t+1," / ",r.length]})]})}function Te(){var L;const{id:r}=q(),[v,c]=o.useState(null),{visning:t,seo:a,erOversat:l}
11=Q(v,"Naturomraade"),[d,x]=o.useState([]),[H,O]=o.useState([]),[p,R]=o.useState([]),[j,V]=o.useState([]),[G,$]=o.useState(!0),[_,S]=o.useState(null);if(o.useEffect(()=>{Promise.all([g.entities.Naturomraade.filter({id:r}),g.entities.Kategori.list(),g.entities.By.list()]).then(async([s,n,h])=>{var P,B;const u=Array.isArray(s)?s[0]:s;if(c(u),x(n),O(h),(P=u.vandresti_ids)!=null&&P.length){const N=await g.entities.Vandrersti.list("-created_date",200);R(N.filter(y=>u.vandresti_ids.includes(y.id)))}if((B=u.cykelrute_ids)!=null&&B.length){const N=await g.entities.Cykelrute.list("-created_date",200);V(N.filter(y=>u.cykelrute_ids.includes(y.id)))}}).finally(()=>$(!1))},[r]),G)return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:e.jsx("div",{className:"w-10 h-10 border-4 border-muted border-t-primary rounded-full animate-spin"})});if(!t)return e.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center gap-4 bg-background",children:[e.jsx("p",{className:"text-muted-foreground text-lg",children:"Siden blev ikke fundet."}),e.jsx(k,{to:"/",className:"text-primary font-semibold underline underline-offset-4",children:"Gå til forsiden"})]});const i=t.navn,K=((L=t.kategori_ids)!=null&&L.length?t.kategori_ids:t.kategori_id?[t.kategori_id]:[]).map(s=>{var n;return(n=d.find(h=>h.id===s))==null?void 0:n.navn}).filter(Boolean),z=(t.by_ids||[]).map(s=>{var n;return(n=H.find(h=>h.id===s))==null?void 0:n.navn}).filter(Boolean),b=[t.image_url,...t.galleri||[]].filter(Boolean),J=p.length>0||j.length>0,U=/marsk|kog|vadehav/i.test(t.navn||""),Z=[{icon:f,label:"Beliggenhed",value:z.join(", ")||t.lokation},{icon:M,label:"Areal",value:t.areal_ha?`${t.areal_ha} ha`:null},{icon:C,label:"Terræn",value:t.terræn},{icon:W,label:"Type",value:t.type},{icon:F,label:"Hundevenlig",value:t.hundevenlig!=null?t.hundevenlig?"Ja":"Nej":null}];return e.jsxs("div",{className:"bg-background min-h-screen",children:[e.jsx(X,{children:_!==null&&e.jsx(pe,{images:b,startIndex:_,onClose:()=>S(null)})}),e.jsx(Y,{title:(a==null?void 0:a.title)||i,description:(a==null?void 0:a.description)||t.resume||xe(t.beskrivelse),image:t.image_url}),e.jsx(ne,{allImages:b,videoUrl:t.video_url,entityName:"Naturomraade",entityId:r,breadcrumbs:[{label:"Forside",to:"/"},{label:i}],categoryLabel:K.join(" · "),title:i,subtitle:t.resume||null,erOversat:l}),e.jsx(re,{facts:Z}),e.jsx("div",{className:"max-w-[1160px] mx-auto px-4 sm:px-6 py-10 sm:py-16",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_340px] gap-8 lg:gap-14 items-start",children:[e.jsxs("div",{className:"space-y-10 sm:space-y-14",children:[t.beskrivelse&&e.jsxs("section",{children:[e.jsx(m,{children:"Om området"}),e.jsx("h2",{className:"font-heading text-2xl sm:text-3xl font-semibold text-foreground mb-4 sm:mb-5",children:i}),e.jsx("div",{className:"prose prose-base max-w-none text-muted-foreground leading-relaxed space-y-4 [&_p]:text-[17px] [&_h2]:text-foreground [&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mt-8 [&_h2]:mb-3 [&_h3]:text-foreground [&_h3]:text-xl [&_h3]:font-bold [&_strong]:text-foreground [&_ul]:list-disc [&_ul]:pl-5 [&_li]:mb-1 [&_img]:rounded-xl [&_a]:text-primary",...he(l),dangerouslySetInnerHTML:{__html:t.beskrivelse}})]}),J&&e.jsxs("section",{className:"bg-card border border-border rounded-2xl p-6 sm:p-8 shadow-sm -mx-2 sm:-mx-0",children:[e.jsx(m,{children:"Ruter gennem området"}),e.jsxs("h2",{className:"font-heading text-2xl sm:text-3xl font-semibold text-foreground mb-5 sm:mb-6",children:["Stier & ruter der krydser ",i.toLowerCase()]}),p.length>0&&e.jsxs("div",{className:"mb-6",children:[e.jsxs("h3",{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground mb-3 flex items-center gap-2",children:[e.jsx(I,{className:"w-4 h-4 text-primary"})," Vandrestier (",p.length,")"]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:p.map(s=>e.jsxs(k,{to:`/vandresti/${s.id}`,className:"flex items-start gap-3 bg-background border border-border rounded-xl p-3 hover:border-primary/50 hover:shadow-md hover:-translate-y-0.5 transition-all group",children:[e.jsx("div",{className:"w-14 h-14 roun
11ded-lg overflow-hidden bg-muted shrink-0 flex items-center justify-center",children:s.image_url?e.jsx("img",{src:s.image_url,alt:s.navn,className:"w-full h-full object-cover"}):e.jsx(I,{className:"w-5 h-5 text-muted-foreground"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"font-semibold text-foreground text-sm group-hover:text-primary transition-colors",children:s.navn}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground mt-1",children:[s.lokation&&e.jsxs("span",{className:"flex items-center gap-1 truncate",children:[e.jsx(f,{className:"w-3 h-3 shrink-0"}),s.lokation]}),s.rute_distance_km?e.jsxs("span",{children:[s.rute_distance_km," km"]}):null]})]}),e.jsx(w,{className:"w-4 h-4 text-muted-foreground shrink-0 mt-3"})]},s.id))})]}),j.length>0&&e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground mb-3 flex items-center gap-2",children:[e.jsx(E,{className:"w-4 h-4 text-primary"})," Cykelruter (",j.length,")"]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:j.map(s=>e.jsxs(k,{to:`/cykelrute/${s.id}`,className:"flex items-start gap-3 bg-background border border-border rounded-xl p-3 hover:border-primary/50 hover:shadow-md hover:-translate-y-0.5 transition-all group",children:[e.jsx("div",{className:"w-14 h-14 rounded-lg overflow-hidden bg-muted shrink-0 flex items-center justify-center",children:s.image_url?e.jsx("img",{src:s.image_url,alt:s.navn,className:"w-full h-full object-cover"}):e.jsx(E,{className:"w-5 h-5 text-muted-foreground"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"font-semibold text-foreground text-sm group-hover:text-primary transition-colors",children:s.navn}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground mt-1",children:[s.lokation&&e.jsxs("span",{className:"flex items-center gap-1 truncate",children:[e.jsx(f,{className:"w-3 h-3 shrink-0"}),s.lokation]}),s.rute_distance_km?e.jsxs("span",{children:[s.rute_distance_km," km"]}):null]})]}),e.jsx(w,{className:"w-4 h-4 text-muted-foreground shrink-0 mt-3"})]},s.id))})]})]}),e.jsx(oe,{entityType:"Naturomraade",entityId:t.id}),t.faciliteter&&e.jsxs("section",{children:[e.jsx(m,{children:"Faciliteter"}),e.jsx("h2",{className:"font-heading text-2xl sm:text-3xl font-semibold text-foreground mb-4 sm:mb-5",children:"Hvad finder du i området"}),e.jsx("div",{className:"prose prose-base max-w-none text-muted-foreground leading-relaxed [&_p]:text-[17px] [&_ul]:list-disc [&_ul]:pl-5 [&_li]:mb-1",dangerouslySetInnerHTML:{__html:t.faciliteter}})]}),b.length>1&&e.jsxs("section",{children:[e.jsx(m,{children:"Galleri"}),e.jsxs("h2",{className:"font-heading text-2xl sm:text-3xl font-semibold text-foreground mb-4 sm:mb-5",children:["Stemning fra ",i.toLowerCase()]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-[2fr_1fr_1fr] auto-rows-[180px] gap-3",children:b.slice(0,5).map((s,n)=>e.jsx("button",{onClick:()=>S(n),className:`overflow-hidden rounded-2xl relative group ${n===0?"md:row-span-2":""}`,children:e.jsx("img",{src:s,alt:"",className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"})},n))})]}),t.lat&&t.lng&&e.jsxs("section",{children:[e.jsx(m,{children:"Find vej"}),e.jsx("h2",{className:"font-heading text-2xl sm:text-3xl font-semibold text-foreground mb-4 sm:mb-5",children:"Find vej"}),e.jsx("div",{className:"rounded-2xl overflow-hidden shadow-md border border-border",children:e.jsx(ie,{lat:t.lat,lng:t.lng,label:i,className:"h-80 rounded-2xl"})}),t.lokation&&e.jsxs("p",{className:"text-sm text-muted-foreground mt-2 flex items-center gap-1.5",children:[e.jsx(f,{className:"w-3.5 h-3.5 text-primary"}),t.lokation]})]}),t.video_url&&e.jsxs("section",{children:[e.jsx(m,{children:"Video"}),e.jsxs("h2",{className:"font-heading text-2xl sm:text-3xl font-semibold text-foreground mb-4 sm:mb-5",children:["Oplev ",i.toLowerCase()]}),e.jsx(de,{url:t.video_url})]})]}),e.jsxs("aside",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-card border border-border rounded-2xl shadow-sm p-6 space-y-4",children:[e.jsx("h3",{className:"font-heading text-xl font-semibold text-foreground",children:"Planlæg dit besøg"}),e.jsxs("div",{className:"divide-y divide-border",children:[t.lokation&&e.jsxs("div",{className:"flex gap-3 py-3 items-start",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-muted flex items-center justify-center shrink-0",children:e.jsx(f,{className:"w-4 h-4 text-primary"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Beliggenhed"}),e.jsx("p",{className:"text-sm font-semibold text-foreground",children:t.lokation})]})]}),t.terræn&&e.jsxs("div",{className:"flex gap-3 py-3 items-start",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-muted flex items-center justify-center shrink-0",children:e.jsx(C,{className:"w-4 h-4 text-primary"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Terræn"}),e.jsx("p",{className:"text-sm font-semibold text-foreground",children:t.terræn})]})]}),t.areal_ha&&e.jsxs("div",{className:"flex gap-3 py-3 items-start",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-muted flex items-center justify-center shrink-0",children:e.jsx(M,{className:"w-4 h-4 text-primary"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Areal"}),e.jsxs("p",{className:"text-sm font-semibold text-foreground",children:[t.areal_ha," ha"]})]})]}),t.hundevenlig!=null&&e.jsxs("div",{className:"flex gap-3 py-3 items-start",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-muted flex items-center justify-center shrink-0",children:e.jsx(F,{className:"w-4 h-4 text-primary"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Hundevenlig"}),e.jsx("p",{className:"text-sm font-semibold text-foreground",children:t.hundevenlig?"Ja":"Nej"})]})]}),t.parkering&&e.jsxs("div",{className:"flex gap-3 py-3 items-start",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-muted flex items-center justify-center shrink-0",children:e.jsx(ue,{className:"w-4 h-4 text-primary"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Parkering"}),e.jsx("p",{className:"text-sm font-semibold text-foreground",children:t.parkering})]})]}),t.adgangsforhold&&e.jsxs("div",{className:"flex gap-3 py-3 items-start",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-muted flex items-center justify-center shrink-0",children:e.jsx(T,{className:"w-4 h-4 text-primary"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Adgangsforhold"}),e.jsx("p",{className:"text-sm font-semibold text-foreground",children:t.adgangsforhold}
11)]})]})]}),e.jsx(ae,{locations:t.lat&&t.lng?[{navn:t.lokation_navn||i,lokation:t.lokation,lat:t.lat,lng:t.lng}]:[]}),e.jsx(le,{link:t.book_link})]}),t.lokalt_tip&&e.jsxs("div",{className:"bg-accent/5 border border-accent/20 rounded-2xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(T,{className:"w-4 h-4 text-accent"}),e.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-accent",children:"Lokalt tip"})]}),e.jsx("p",{className:"text-sm text-foreground/80 leading-relaxed",children:t.lokalt_tip})]}),e.jsx(ce,{html:t.tilgaengelighed,billeder:t.tilgaengelighed_billeder}),t.website&&e.jsxs("a",{href:se(t.website),target:"_blank",rel:"noopener noreferrer",className:"block bg-card border border-border rounded-2xl p-4 shadow-sm hover:border-primary/50 hover:shadow-md transition-all group",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-1",children:"Website"}),e.jsx("p",{className:"text-sm font-medium text-primary group-hover:underline truncate",children:t.website.replace(/^https?:\/\//,"")})]})]})]})}),U&&e.jsx(me,{stednavn:i})]})}export{Te as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.