1import{cM as b,_ as j,r,a9 as N,j as e,X as w,aP as x,aG as v,bc as y,U as k,ay as z,$ as C,M as P,L,a1 as S}from"./index-CQVfxCQm.js";import{T as A}from"./trustindex-reviews-ackNxRBe.js";import{A as B,a as R,B as $}from"./apartment-hero-DWW3RviW.js";import{S as E}from"./services-strip-D6YVpRks.js";import{g as p}from"./seasonal-pricing-DKKY31W0.js";import{A as M,B as _}from"./apartment-booking-badge-CMHf8YAX.js";import{C as I}from"./chevron-left-C6uo0ZqJ.js";import"./map-pin-ffo6BrMR.js";import"./anchor-BKcUpL6X.js";import"./utensils-crossed-85BjzRb-.js";import"./circle-parking-DnC6D2rz.js";import"./plug-C9FC_vYt.js";const T="https://wa.me/393516582000";function J(){const{apt:t}=b.useLoaderData(),h=j.filter(s=>s.slug!==t.slug).slice(0,3),a=t.gallery,[l,n]=r.useState(null),[u,m]=r.useState(!1),g=p(t.slug,t.pricePerNight);r.useEffect(()=>{N("apartment_view",{apartment:t.slug,locale:"it"})},[t.slug]);const f=s=>n(s),o=r.useCallback(()=>n(null),[]),c=r.useCallback(()=>n(s=>s===null?null:(s-1+a.length)%a.length),[a.length]),d=r.useCallback(()=>n(s=>s===null?null:(s+1)%a.length),[a.length]);return r.useEffect(()=>{if(l===null)return;const s=i=>{i.key==="Escape"&&o(),i.key==="ArrowLeft"&&c(),i.key==="ArrowRight"&&d()};return document.addEventListener("keydown",s),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",s),document.body.style.overflow=""}},[l,o,c,d]),e.jsxs("div",{className:"min-h-screen",children:[e.jsx(w,{}),e.jsx(B,{image:a[0],images:a,onImageClick:f,imageAlt:`${t.name} â casa vacanza a Palau Sardegna (${t.location})`,location:t.location,name:t.name,short:t.short,backHref:"/appartamenti",backLabel:"Tutti gli appartamenti",ratingLabel:"4.9 · 1.140 recensioni",galleryLabel:"Vedi tutte le foto",galleryTitle:"Le foto dell'appartamento",badge:e.jsx(M,{slug:t.slug})}),e.jsxs("article",{className:"mx-auto max-w-7xl px-4 md:px-6 pt-4 md:pt-10",children:[e.jsx(R,{apt:t,lang:"it"}),l!==null&&e.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/95",children:[e.jsx("button",{type:"button",onClick:o,"aria-label":"Chiudi",className:"absolute right-4 top-4 z-10 inline-flex h-10 w-10 items-center justify-center rounded-full bg-white/10 text-white transition hover:bg-white/20",children:e.jsx(x,{className:"h-5 w-5"})}),e.jsxs("div",{className:"absolute left-4 top-4 z-10 text-sm text-white/80",children:[l+1," / ",a.length]}),e.jsx("button",{type:"button",onClick:c,"aria-label":"Precedente",className:"absolute left-3 z-10 inline-flex h-11 w-11 items-center justify-center rounded-full bg-white/10 text-white transition hover:bg-white/20 md:left-6",children:e.jsx(I,{className:"h-6 w-6"})}),e.jsx("img",{src:a[l],alt:`${t.name} a Palau Sardegna â foto ${l+1} di ${a.length}`,className:"max-h-[88vh] max-w-[92vw] object-contain"}),e.jsx("button",{type:"button",onClick:d,"aria-label":"Successiva",className:"absolute right-3 z-10 inline-flex h-11 w-11 items-center justify-center rounded-full bg-white/10 text-white transition hover:bg-white/20 md:right-6",children:e.jsx(v,{className:"h-6 w-6"})})]}),u&&e.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/95",children:[e.jsx("button",{type:"button",onClick:()=>m(!1),"aria-label":"Chiudi",className:"absolute right-4 top-4 z-10 inline-flex h-10 w-10 items-center justify-center rounded-full bg-white/10 text-white transition hover:bg-white/20",children:e.jsx(x,{className:"h-5 w-5"})}),e.jsx("img",{src:t.floorplan,alt:`Planimetria ${t.name} â Palau Sardegna`,className:"max-h-[88vh] max-w-[92vw] object-contain"})]}),e.jsxs("div",{className:"mt-0 grid min-w-0 gap-8 md:mt-10 lg:grid-cols-3 lg:gap-12",children:[e.jsxs("div",{className:"order-2 min-w-0 lg:order-none lg:col-span-2",children:[e.jsx("h2",{className:"section-title",children:"L'Appartamento"}),e.jsx("div",{className:"mt-4 space-y-4 text-base md:text-lg leading-relaxed text-foreground/80",children:t.description.split(` 2 3`).map((s,i)=>e.jsx("p",{children:s},i))}),e.jsx("h3",{className:"mt-10 font-display text-xl font-semibold",children:"Cosa offre"}),e.jsx("ul",{className:"mt-4 grid gap-3 sm:grid-cols-2",children:t.features.map(s=>e.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[e.jsx(y,{className:"h-4 w-4 text-primary"})," ",s]},s))})]}),e.jsxs("aside",{className:"order-1 h-fit w-full min-w-0 max-w-full overflow-hidden rounded-2xl border border-border bg-card p-4 shadow-card sm:p-6 lg:order-none",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Puoi avere questo appartamento a partire da:"}),e.jsxs("div",{className:"mt-1 flex items-baseline gap-2",children:[e.jsxs("span",{className:"font-display text-3xl font-semibold text-primary",children:["â¬",g]}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"/ notte"})]}),e.jsx("span",{className:"block text-xs text-muted-foreground",children:"per 2 persone"}),e.jsx("div",{className:"mt-1.5",children:e.jsx($,{locale:"it",slug:t.slug})}),e.jsx("span",{className:"mt-1 inline-flex items-center rounded-full bg-emerald-100 px-2 py-0.5 text-[10px] font-semibold text-emerald-700",children:"Miglior prezzo disponibile"}),e.jsx("p",{className:"mt-2 text-xs leading-relaxed text-muted-foreground",children:"Tariffa diretta, senza commissioni di intermediazione. Miglior prezzo garantito prenotando direttamente con noi."})]}),e.jsxs("div",{className:"mt-5 grid grid-cols-2 gap-3 border-y border-border py-5 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(k,{className:"h-4 w-4 text-muted-foreground"})," ",t.guests," ospiti"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(z,{className:"h-4 w-4 text-muted-foreground"})," ",t.bedrooms," camere"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{className:"h-4 w-4 text-muted-foreground"})," ",t.bathrooms," bagni"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[t.area," m²"]})]}),e.jsxs("div",{className:"mt-6 flex flex-col gap-3",children:[e.jsx("a",{href:C,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 rounded-full bg-primary px-4 py-3 text-sm font-semibold text-primary-foreground shadow-card transition hover:opacity-90",children:"Prenota ora"}),e.jsxs("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 rounded-full bg-[#25D366] px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[e.jsx(P,{className:"h-4 w-4"}),"Scrivici su WhatsApp"]})]}),e.jsx("p",{className:"mt-3 text-center text-xs text-muted-foreground",children:"Prenotazione diretta · Conferma entro 24h · Cancellazione flessibile"}),t.floorplan&&e.jsxs("div",{className:"mt-6 border-t border-border pt-5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Planimetria"}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.area," m²"]})]}),e.jsx("button",{type:"button",onClick:()=>m(!0),className:"mt-3 block w-full overflow-hidden rounded-lg border border-border bg-white p-2 transition hover:shadow-md","aria-label":"Ingrandisci planimetria",children:e.jsx("img",{src:t.floorplan,alt:`Planimetria ${t.name} â Palau Sardegna`,loading:"lazy",className:"h-auto w-full object-contain"})})]}),e.jsxs("div",{className:"mt-6 border-t border-border pt-5",children:[e.jsx("div",{className:"flex items-center justify-between gap-2",children:e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Dove si trova"})}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:t.location}),e.jsx("div",{className:"mt-3",children:e.jsx("a",{href:t.googleMapsUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-full bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-card transition-opacity hover:opacity-90",children:"Apri su Google Maps"})})]})]})]})]}),e.jsx(E,{title:"Servizi inclusi"}),e.jsxs("section",{className:"mx-auto max-w-7xl px-4 md:px-6 pb-6 md:pb-10",children:[e.jsx("h2",{className:"section-title",children:"Recensioni ospiti"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Una sintesi delle recensioni verificate dei nostri ospiti."}),e.jsx("div",{className:"mt-6",children:e.jsx(A,{})})]}),e.jsxs("section",{className:"mx-auto max-w-7xl px-4 md:px-6 py-8 md:py-14",children:[e.jsx("h2",{className:"section-title mb-10",children:"Altri appartamenti"}),e.jsx("div",{className:"grid gap-8 md:grid-cols-3",children:h.map(s=>e.jsxs(L,{to:"/appartamenti/$slug",params:{slug:s.slug},className:"group overflow-hidden rounded-2xl bg-card shadow-card",children:[e.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:e.jsx("img",{src:s.image,alt:s.name,width:1280,height:960,loading:"lazy",className:"h-full w-full object-cover transition-transform duration-700 group-hover:scale-105"})}),e.jsxs("div",{className:"p-5",children:[e.jsx("h3",{className:"font-display text-lg font-semibold",children:s.name}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["da â¬",p(s.slug,s.pricePerNight)," / notte"]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"per 2 persone"})]})]},s.slug))})]}),e.jsx(S,{})]})}
3export{J as component};
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.