import{c as R,r as N,j as t,b as T}from"./app-BiexncSX.js";import{P as w}from"./page-layout-Cz4ecnC7.js";import{b as y,T as _,c as k,a as A}from"./tabs-siZHu5c4.js";import S from"./Room-CKo807DI.js";import{B}from"./bed-double-DlbqgL2k.js";/* empty css            */import"./Footer-Szv-FVt1.js";import"./Header-9KR7dKcf.js";import"./drawer-DkKcgqPr.js";import"./index-Bx9iUFeV.js";import"./index-BKRdUh5V.js";import"./button-Cwvd_D5X.js";import"./utils-DvRnx1Xn.js";import"./index-DRVc8jnD.js";import"./index-CqDcnRSI.js";import"./card-DJd5CcuI.js";import"./BookingKeyCart-C_D189KV.js";import"./UiCardFooter-DanosNug.js";import"./spinner-BshPoFqP.js";import"./loader-circle-C36m3ppM.js";import"./createLucideIcon-CiyItOCI.js";import"./calBooking-B0CTB3UO.js";import"./dayjs.min-BZ3vM70Q.js";import"./key-Dw2ORQjm.js";import"./utensils-CU7nxPop.js";import"./chevron-right-D-bIFB2o.js";import"./trash-2-B8EoOc8P.js";import"./phone-Bieilqj-.js";import"./house-CmuRWHdh.js";import"./SearchRoom-Ct7E9WF4.js";import"./calendar-Bl7E87vb.js";import"./chevron-left-CfTNJLZd.js";import"./chevron-up-D0SwuXIU.js";import"./popover-BxvDGqL9.js";import"./index-vCsTGnV6.js";import"./index-BxgPClSG.js";import"./users-B6ln6dzh.js";import"./youtube-C8R3zjo2.js";import"./separator-BE6xCedb.js";import"./index-Dql7-O7m.js";import"./index-BLf-KPWz.js";import"./select-Oi4we0ay.js";import"./check-Do_LJdyj.js";import"./index-BdQq_4o_.js";import"./index-B9bcoF29.js";import"./index-3q7cNFQn.js";import"./index-Crj9qdjp.js";import"./index-BzyVuPsA.js";import"./sonner-8z7PTnwf.js";import"./index-BphRgCCf.js";import"./triangle-alert-Dp60wOMH.js";import"./index-CW_Do8vH.js";import"./Icon-DEKRlUi3.js";import"./lucide-react-C-jOYeYF.js";import"./send-D-Y6pdiK.js";import"./wifi-yGaHKi1T.js";import"./sun-D646Bdfj.js";import"./chevrons-up-down-B23gAN10.js";import"./shield-check-BcGX3gbR.js";import"./plus-Cm0TKlUw.js";import"./clock-CXI9z3-R.js";import"./credit-card-DrNFemOT.js";import"./ellipsis-BcGSaUdp.js";import"./globe-CZ3jv1ui.js";import"./loader-uls-v5oU.js";import"./minus-BQGRvjuE.js";import"./monitor-4BAY-8Q0.js";import"./save-BnaHUyyd.js";import"./search-DVB94mIy.js";import"./sparkles-duG_NONK.js";import"./x-Cp4MPESs.js";import"./ReserveCard-B_soe0CO.js";import"./UiSideDetailsCard-BSdEtr6f.js";import"./dialog-CRgq9Gqn.js";import"./UiItemDatesSelector-BMHiyR9P.js";import"./UiImageIcon-tmS4Aj39.js";import"./embla-carousel-autoplay.esm-3NNB6AVS.js";import"./FullscreenImageCarousel-DayeM2rp.js";import"./RoomImageCarousel-pV7NSoC-.js";import"./MobilleRoomHero-CR_E-hdI.js";function et(v){const o=R.c(13),{category:m,allRoomFacilities:n,allRoomMealPackages:c,allRoomAddons:d,search:x,activeRoom:f,booking:i}=v,[u,g]=N.useState(f);let s;o[0]!==i?(s=i!==null?i?.rooms??[]:[],o[0]=i,o[1]=s):s=o[1];const b=s;let a;o[2]!==b?(a=function(e){return b.some(h=>h.room_number===e)},o[2]=b,o[3]=a):a=o[3];const p=a;let l;return o[4]!==u||o[5]!==d||o[6]!==n||o[7]!==c||o[8]!==i?.rooms||o[9]!==m||o[10]!==p||o[11]!==x?(l=t.jsx(w,{title:"Room",className:"mb-20 sm:mb-0 ",children:t.jsx("div",{className:"min-h-[60vh] sm:py-6 mb-10 w-full max-w-300 2xl:max-w-340 mx-auto  sm:px-4 ",children:!m.rooms||m.rooms.length===0?t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:"bg-main/10 p-6 rounded-full mb-6 w-fit",children:t.jsx(B,{className:"w-10 h-10 text-main"})}),t.jsx("h2",{className:"text-2xl font-semibold text-neutral-900",children:"No Rooms Available"}),t.jsx("p",{className:"text-neutral-500 mt-2 max-w-md",children:"We couldn't find available rooms for the selected dates. Try adjusting your dates or check another room category."}),t.jsx("button",{onClick:C,className:"mt-6 px-6 py-3 bg-main text-white rounded-full ring-4 ring-main/20 hover:scale-105 transition w-fit",children:"Back to Rooms"})]}):t.jsxs(y,{value:u||m.rooms[0].room_number.toString(),onValueChange:g,className:"space-y-4",children:[t.jsx(_,{variant:"line",className:"hidden sm:block gap-6 px-0",defaultValue:0,children:m.rooms.map((r,e)=>t.jsxs(k,{value:r.room_number.toString(),children:["Room 0",e+1," (",r.room_number,")",p(r.room_number)&&t.jsx("span",{className:"text-sm  text-green-700",children:"[ Reserved ]"}),r.isAvailable!==void 0&&t.jsx(t.Fragment,{children:r.isAvailable?!p(r.room_number)&&t.jsx("span",{className:"text-sm  text-green-700",children:" [ Available ] "}):t.jsx("span",{className:"text-sm  text-red-700",children:"   [ Not Available ]   "})})]},e))}),m.rooms.map((r,e)=>{const h=i?.rooms?.find(j=>j.room_number===r.room_number);return t.jsx(A,{value:r.room_number.toString(),children:t.jsx(S,{room:r,category:m,allRoomFacilities:n,allRoomMealPackages:c,allRoomAddons:d,search:x,reserved:h})},e)})]})})}),o[4]=u,o[5]=d,o[6]=n,o[7]=c,o[8]=i?.rooms,o[9]=m,o[10]=p,o[11]=x,o[12]=l):l=o[12],l}function C(){return T.visit("/")}export{et as default};
