import{r as p,j as e}from"./app-BiexncSX.js";import{b as d,C as i}from"./card-DJd5CcuI.js";import{A as x,C as g,a as h,b}from"./embla-carousel-autoplay.esm-3NNB6AVS.js";import{c as o}from"./utils-DvRnx1Xn.js";function v({images:s,discount:a,className:n,classNameImage:u,classNameCard:c}){const r=p.useRef(x({delay:3e3,stopOnInteraction:!0})),t=s.length>0&&s[0].url?s:[{url:"/images/placeholders/room-placeholder.jpg",alt_text:"Room plaseholder image"}];return console.log(t,s),e.jsx(g,{plugins:[r.current],className:o("w-full max-w-full",n),onMouseEnter:r.current.stop,onMouseLeave:r.current.reset,children:e.jsx(h,{className:"gap-4",children:t.map((l,m)=>l.url?e.jsx(b,{children:e.jsx(d,{className:o("overflow-hidden rounded-none rounded-t-sm p-0 border-none",c),children:e.jsxs(i,{className:o("relative p-0 aspect-5/3",u),children:[e.jsx("div",{className:"absolute inset-0 bg-cover bg-center bg-no-repeat",style:{backgroundImage:`url(${l.url})`}}),a&&e.jsxs("span",{className:"absolute top-2 right-2 bg-main/85 text-white text-xs font-semibold py-1 px-2 rounded-sm",children:["   ",a,"  "]}),e.jsx("div",{className:"absolute inset-0 flex items-end p-2"})]})})},m):null)})})}export{v as R};
