import{e as r,j as e,r as c}from"./vendor-react-CVHocMAO.js";import{y as m,z as d,c6 as o,C as u,B as g}from"./index-DXdAv5n3.js";import{m as n}from"./vendor-motion-CP2nHqR4.js";import{C as h}from"./circle-check-CJi34ijI.js";import{C as y}from"./calendar-check-gNY_7O9f.js";function w({isOpen:t,onClose:i}){const s=r();return e.jsx(m,{open:t,onOpenChange:l=>!l&&i(),children:e.jsxs(d,{mobileBottomSheet:!1,className:`max-w-md ${o.modal.borderRadius} ${o.modal.shadow} p-8`,children:[e.jsx(u,{className:"sr-only",children:"Booking request submitted"}),e.jsxs("div",{className:"flex flex-col items-center text-center space-y-6",children:[e.jsx(n.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.2,type:"spring",stiffness:200},className:"w-20 h-20 rounded-full bg-green-500 flex items-center justify-center",children:e.jsx(h,{className:"w-12 h-12 text-white",strokeWidth:2.5})}),e.jsx(n.h2,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"text-2xl font-bold text-gray-900",children:"Your booking request has been submitted"}),e.jsx(n.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"text-gray-600 text-base leading-relaxed",children:"The host will review your request within 24 hours. You'll receive an email notification once they respond."}),e.jsx(n.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"w-full pt-4",children:e.jsxs(g,{onClick:()=>{i(),s("/bookings")},className:"w-full h-12 rounded-full bg-brand-500 hover:brightness-90 text-white font-semibold",children:[e.jsx(y,{className:"w-4 h-4 mr-2"}),"View my bookings"]})})]})]})})}const a="plec_pending_booking";function x(t){try{sessionStorage.setItem(a,JSON.stringify(t))}catch{}}function j(t){if(t)return t;try{const i=sessionStorage.getItem(a);return i?JSON.parse(i):null}catch{return null}}function B(){try{sessionStorage.removeItem(a)}catch{}}function C(){const t=r();return{startCheckout:c.useCallback(s=>{x(s),t("/checkout",{state:{pendingBooking:s}})},[t])}}export{w as B,B as c,j as r,C as u};