import{u as N,r as y,j as s,O as w,d as v,g as E,k as R,l as k,m as P}from"./vendor-BXQAQzXu.js";import{N as S,F as D}from"./FooterProp-pbXSpU5I.js";import{N as F}from"./NotFoundProp-Ctp8IGmy.js";import"./OptimizedImage-BbLjun1q.js";import"./Global-CKpXTxwr.js";import"./transformUtm-9lP4nPuV.js";import"./appendURL-CIK5EvW3.js";const $=()=>[{rel:"stylesheet",href:v}],z=({data:e,params:r})=>{var p,o,u,a,m,c,g,j,d;let t="at";Object.keys(r).forEach(b=>{r[b]&&(t+=`/${r[b]}`)});const i=["bluekarmaseminyak","bluekarmaubud","bluekarmavillage"],f=e==null?void 0:e.assetUrl,n=e&&(e!=null&&e.prop[0])&&((o=(p=e==null?void 0:e.prop[0])==null?void 0:p.attributes)!=null&&o.seo.seoTitle)?e.prop[0].attributes.seo.seoTitle:"Dijiwa Sanctuaries",l=e&&(e!=null&&e.prop[0])&&((a=(u=e==null?void 0:e.prop[0])==null?void 0:u.attributes)!=null&&a.seo.seoDescription)?e.prop[0].attributes.seo.seoDescription:"Dijiwa Sanctuaries",h=e&&((g=(c=(m=e==null?void 0:e.prop[0])==null?void 0:m.attributes)==null?void 0:c.seo)==null?void 0:g.seoCanonical)||(r!=null&&r.propSlug&&i.includes(r.propSlug)?`https://bluekarmasecrets.dijiwasanctuaries.com${t}`:`https://dijiwasanctuaries.com/${t}`),x=e!=null&&e.prop[0]&&((d=(j=e==null?void 0:e.prop[0])==null?void 0:j.attributes)!=null&&d.seo.seoRobots)?e.prop[0].attributes.seo.seoRobots:"index, follow";return[{title:n},{name:"description",content:l},{tagName:"link",rel:"canonical",href:h},{name:"robots",content:x},{property:"og:title",content:n},{property:"og:description",content:l},{property:"og:type",content:"website"},{property:"twitter:card",content:f+"/uploads/logo_dijiwa_mobile_color_5f421f9603.png"},{property:"twitter:title",content:n},{property:"twitter:description",content:l}]};function H(){const{prop:e,rooms:r,offers:t,facilities:i,experiences:f,assetUrl:n,allAreas:l,allGroups:h,allProperties:x,allPropgroupedByArea:p,utm:o}=N();y.useEffect(()=>{const m=o&&Object.values(o).some(c=>c!==null&&c!=="");typeof window<"u"&&m&&sessionStorage.setItem("utmData",JSON.stringify(o))},[o]);const u=t.length>0,a=f.length>0;return s.jsxs(s.Fragment,{children:[s.jsx(S,{listProperties:x,listGroups:h,listArea:l,groupedByArea:p,propRooms:r,propFacilities:i,assetUrl:n}),s.jsx(w,{}),s.jsx(D,{property:e[0],hasOffers:u,hasExperiences:a})]})}function I(){const e=E(),r=R(),t=k("routes/at.$propSlug");return P(e)?e.status===404?(y.useEffect(()=>{if(t===void 0){const i=setTimeout(()=>{r("/")},4e3);return()=>clearTimeout(i)}},[e,r]),s.jsxs(s.Fragment,{children:[t!=null&&s.jsx(F,{data:t}),t===void 0&&s.jsx("section",{className:"bg-whiteBase flex flex-col py-0 md:py-12 justify-center align-middle gap-6 px-[24px]",children:s.jsxs("div",{className:"flex flex-col justify-center items-center gap-6",children:[s.jsx("h2",{className:"heading4-subheadline capitalize",children:"Property Not Found"}),s.jsx("p",{className:"bodytext2-leadingtrim",children:"This page maight be not available, you will be redirected shortly!"}),s.jsxs("p",{className:"bodytext2-leadingtrim",children:["Return to"," ",s.jsx("a",{className:"hover:text-sundanceGold-base",href:"/",children:"Homepage"})]})]})})]})):s.jsxs("div",{children:[s.jsxs("h1",{children:[e.status," ",e.statusText]}),s.jsx("p",{children:e.data})]}):e instanceof Error?s.jsx("section",{className:"bg-whiteBase flex flex-col py-0 md:py-12 justify-center align-middle gap-6 px-[24px]",children:s.jsxs("div",{className:"flex flex-col justify-center items-center gap-6",children:[s.jsx("h2",{className:"heading4-subheadline capitalize",children:"Something went wrong"}),s.jsxs("p",{className:"bodytext2-leadingtrim",children:["If this issues persist, you can directly sent email to"," ",s.jsx("a",{className:"hover:text-sundanceGold-base",href:"mailto:info@dijiwasanctuaries.com",children:"info@dijiwasanctuaries.com"})]}),s.jsxs("p",{className:"bodytext2-leadingtrim",children:["Return to"," ",s.jsx("a",{className:"hover:text-sundanceGold-base",href:"/",children:"Homepage"})]})]})}):s.jsx("h1",{children:"Unknown Error!"})}export{I as ErrorBoundary,H as default,$ as links,z as meta};