PageSourceSearch

https://tour-manager-hub-1-r-1769346649.emergent.host/static/js/2726.7acde8ad.chunk.js

js tour-manager-hub-1-r-1769346649.emergent.host collected 2026-10-03 03:23:42 UTC 24,721 bytes, 3 lines download raw bytes

1/*! For license information please see 2726.7acde8ad.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[2726],{6873:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("user-cog",[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},7104:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},7899:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]])},9855:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},19233:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]])},20059:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},22024:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},23658:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]])},25244:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]])},35327:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]])},41680:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},42726:(e,t,a)=>{a.r(t),a.d(t,{ManageMICEBookings:()=>p,default:()=>u});var s=a(65043),i=a(91140),n=a(13390),r=a(82054),o=a(22024),l=a(28646),c=a(7104),d=a(41680),h=a(56328),m=a(63478),x=a(70579);const g="https://balkandestination.com",p=()=>
2{const[e,t]=(0,s.useState)([]),[a,p]=(0,s.useState)(!0),[u,y]=(0,s.useState)({});(0,s.useEffect)(()=>{b()},[]);const b=async()=>{try{const e=localStorage.getItem("token"),a=await fetch(`${g}/api/admin/mice-bookings`,{headers:{Authorization:`Bearer ${e}`}});if(a.ok){const e=await a.json();t(e)}}catch(e){console.error("Failed to load bookings:",e),h.oR.error("Failed to load bookings")}finally{p(!1)}},k=async e=>{y({...u,[e]:!0});try{const t=localStorage.getItem("token"),a=await fetch(`${g}/api/admin/mice-bookings/${e}/generate-contract`,{method:"POST",headers:{Authorization:`Bearer ${t}`}});if(a.ok)h.oR.success("Contract generated successfully!"),b();else{const e=await a.json();h.oR.error(e.detail||"Failed to generate contract")}}catch(t){console.error("Failed to generate contract:",t),h.oR.error("Failed to generate contract")}finally{y({...u,[e]:!1})}};return a?(0,x.jsx)(m.U,{title:"MICE Bookings",children:(0,x.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:(0,x.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})})}):(0,x.jsx)(m.U,{title:"MICE Bookings",children:0===e.length?(0,x.jsx)(i.Zp,{children:(0,x.jsxs)(i.Wu,{className:"p-12 text-center",children:[(0,x.jsx)(l.A,{className:"h-16 w-16 text-gray-300 mx-auto mb-4"}),(0,x.jsx)("h3",{className:"text-xl font-semibold mb-2",children:"No Bookings Yet"}),(0,x.jsx)("p",{className:"text-gray-500",children:"MICE bookings will appear here"})]})}):(0,x.jsx)("div",{className:"space-y-4",children:e.map(e=>(0,x.jsx)(i.Zp,{children:(0,x.jsx)(i.Wu,{className:"p-6",children:(0,x.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4 items-start",children:[(0,x.jsxs)("div",{children:[(0,x.jsx)("p",{className:"text-sm text-gray-600",children:"Booking #"}),(0,x.jsx)("p",{className:"font-semibold",children:e.booking_number})]}),(0,x.jsxs)("div",{children:[(0,x.jsx)("p",{className:"text-sm text-gray-600",children:"Client"}),(0,x.jsx)("p",{className:"font-semibold",children:e.client_name}),(0,x.jsx)("p",{className:"text-xs text-gray-500",children:e.client_email})]}),(0,x.jsxs)("div",{children:[(0,x.jsx)("p",{className:"text-sm text-gray-600",children:"Event Date"}),(0,x.jsx)("p",{className:"font-semibold",children:e.event_date}),(0,x.jsxs)("p",{className:"text-xs text-gray-500",children:[e.attendees," attendees"]})]}),(0,x.jsxs)("div",{children:[(0,x.jsx)("p",{className:"text-sm text-gray-600",children:"Status"}),(0,x.jsx)("span",{className:"px-2 py-1 rounded text-xs font-semibold "+("confirmed"===e.booking_status?"bg-green-100 text-green-700":"pending"===e.booking_status?"bg-yellow-100 text-yellow-700":"bg-gray-100 text-gray-700"),children:e.booking_status})]}),(0,x.jsx)("div",{className:"flex flex-col gap-2",children:e.contract_pdf_path?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 mb-2",children:[(0,x.jsx)(r.A,{className:"h-4 w-4"}),(0,x.jsx)("span",{children:"Contract Generated"})]}),(0,x.jsxs)(n.$,{onClick:()=>(async e=>{try{const t=localStorage.getItem("token"),a=await fetch(`${g}/api/admin/mice-bookings/${e}/download-contract`,{headers:{Authorization:`Bearer ${t}`}});if(a.ok){const t=await a.blob(),s=window.URL.createObjectURL(t),i=document.createElement("a");i.href=s,i.download=`MICE_Contract_${e}.pdf`,document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(s),document.body.removeChild(i),h.oR.success("Contract downloaded!")}else h.oR.error("Failed to download contract")}catch(t){console.error("Failed to download contract:",t),h.oR.error("Failed to download contract")}})(e.id),size:"sm",variant:"outline",className:"w-full",children:[(0,x.jsx)(c.A,{className:"h-4 w-4 mr-2"}),"Download Contract"]}),(0,x.jsx)(n.$,{onClick:()=>k(e.id),size:"sm",variant:"outline",className:"w-full",disabled:u[e.id],children:u[e.id]?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(o.A,{className:"h-4 w-4 mr-2 animate-spin"})," Regenerating..."]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(d.A,{className:"h-4 w-4 mr-2"})," Regenerate"]})})]}):(0,x.jsx)(n.$,{onClick:()=>k(e.id),size:"sm",className:"w-full bg-blue-600 hover:bg-blue-700",disabled:u[e.id],children:u[e.id]?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(o.A,{className:"h-4 w-4 mr-2 animate-spin"})," Generating..."]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(d.A,{className:"h-4 w-4 mr-2"})," Generate Contract"]})})})]})})},e.id))})})},u=p},49761:(e,t,a)=>{a.d(t,{A:()=>s});
2const s=(0,a(77784).A)("clipboard-check",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]])},53569:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("bed",[["path",{d:"M2 4v16",key:"vw9hq8"}],["path",{d:"M2 8h18a2 2 0 0 1 2 2v10",key:"1dgv2r"}],["path",{d:"M2 17h20",key:"18nfp3"}],["path",{d:"M6 8v9",key:"1yriud"}]])},62029:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]])},63478:(e,t,a)=>{a.d(t,{U:()=>H});var s=a(65043),i=a(18163),n=a(65469),r=a(23658),o=a(20059),l=a(49761),c=a(70764),d=a(97950),h=a(51419),m=a(25244),x=a(23988),g=a(64580),p=a(53569),u=a(83796),y=a(28006),b=a(7899),k=a(42812),f=a(86376),v=a(35327),j=a(84669),w=a(77819),N=a(56099),A=a(6873),_=a(28646),M=a(62029),C=a(19233),z=a(40614),$=a(63771),R=a(9855),S=a(13390),q=a(56328),B=a(70579);
2function F(){const e=(0,i.Zp)(),[t,a]=(0,s.useState)([]),[n,r]=(0,s.useState)(0),[o,l]=(0,s.useState)(!1),[c,F]=(0,s.useState)(!1),[H,I]=(0,s.useState)(!1),[L,E]=(0,s.useState)({top:0,right:0}),V=(0,s.useRef)(null),D=(0,s.useRef)(null);(0,s.useEffect)(()=>{P();const e=setInterval(P,6e4);return()=>clearInterval(e)},[]),(0,s.useEffect)(()=>{if(o&&V.current){const e=V.current.getBoundingClientRect();E({top:e.bottom+8,right:window.innerWidth-e.right})}},[o]),(0,s.useEffect)(()=>{function e(e){const t=V.current&&!V.current.contains(e.target),a=D.current&&!D.current.contains(e.target);t&&a&&l(!1)}return o&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[o]);const P=async()=>{try{const e=localStorage.getItem("token"),t=await fetch("https://balkandestination.com/api/admin/notifications",{headers:{Authorization:`Bearer ${e}`}});if(t.ok){const e=await t.json();a(e.notifications||[]),r(e.unread_count||0)}}catch(e){console.error("Failed to fetch notifications:",e)}},T=(e,t="")=>{const a=(e||"").toLowerCase(),s=((t||"").toLowerCase(),(e,t,a)=>(0,B.jsx)("span",{className:`inline-flex items-center justify-center h-7 w-7 rounded-full ${t}`,children:(0,B.jsx)(e,{className:`h-4 w-4 ${a}`})}));return"cart_booking"===a||/\bcart-\d{8}-/i.test(t)?s(h.A,"bg-emerald-100","text-emerald-600"):"tour_booking"===a||"daily_tour"===a||/daily tour|tagesausflug/i.test(t)?s(m.A,"bg-violet-100","text-violet-600"):"transfer_booking"===a||/transfer/i.test(t)?s(x.A,"bg-blue-100","text-blue-600"):"hotel_booking"===a||/hotel/i.test(t)?s(g.A,"bg-amber-100","text-amber-600"):"accommodation_booking"===a||/accommodation|apartment|villa/i.test(t)?s(p.A,"bg-orange-100","text-orange-600"):"car_rental_booking"===a||/car rental/i.test(t)?s(x.A,"bg-cyan-100","text-cyan-600"):"self_guided_tour_booking"===a||/self-guided|self guided/i.test(t)?s(u.A,"bg-lime-100","text-lime-600"):"hiking_tour_booking"===a||/hiking/i.test(t)?s(y.A,"bg-emerald-100","text-emerald-700"):"audio_guide_order"===a||/audio guide|audioguide/i.test(t)?s(b.A,"bg-fuchsia-100","text-fuchsia-600"):"flight_booking"===a||/flight/i.test(t)?s(k.A,"bg-sky-100","text-sky-600"):"payment_received"===a||"commission_paid"===a||"booking_payment"===a||/payment|paid|invoice|commission/i.test(t)?s(f.A,"bg-green-100","text-green-600"):"email_received"===a||/email/i.test(t)?s(v.A,"bg-indigo-100","text-indigo-600"):"whatsapp_received"===a||/whatsapp/i.test(t)?s(j.A,"bg-green-100","text-green-700"):"approval_needed"===a||"crm_approval_needed"===a||/approval/i.test(t)?s(w.A,"bg-orange-100","text-orange-600"):"ai_processing_complete"===a||"agent_action"===a||/ai agent/i.test(t)?s(N.A,"bg-purple-100","text-purple-600"):"new_crm_card"===a||/crm card/i.test(t)?s(A.A,"bg-blue-100","text-blue-600"):"new_booking"===a||/booking/i.test(t)?s(_.A,"bg-teal-100","text-teal-600"):"arka"===a||"cash_flow"===a||/arka|advance|cash held/i.test(t)?s(M.A,"bg-yellow-100","text-yellow-700"):s(C.A,"bg-gray-100","text-gray-500")},U=e=>{switch(e){case"urgent":return"border-l-4 border-red-500 bg-red-50";case"high":return"border-l-4 border-orange-500 bg-orange-50";default:return"border-l-4 border-gray-200"}},Z=e=>{const t=new Date(e),a=new Date-t,s=Math.floor(a/6e4),i=Math.floor(a/36e5),n=Math.floor(a/864e5);return s<1?"Just now":s<60?`${s}m ago`:i<24?`${i}h ago`:n<7?`${n}d ago`:t.toLocaleDateString()},O=t=>{const a=(e=>{const t=e.link,a=e.type,s=e.message||"";if("cart_booking"===a||/\bCART-\d{8}-[A-Z0-9]+/i.test(s)||"string"===typeof t&&t.includes("cart-bookings")){const e=s.match(/CART-\d{8}-[A-Z0-9]+/i);return e?`/admin/cart-bookings?ref=${e[0].toUpperCase()}`:"/admin/cart-bookings"}if(s.includes("CRM card")&&s.includes("approval"))return"/admin/crm/approvals";if(s.includes("CRM card"))return"/admin/crm";const i={ai_processing_complete:"/admin/ai-approvals",approval_needed:"/admin/ai-approvals",crm_approval_needed:"/admin/crm/approvals",new_crm_card:"/admin/crm/approvals",email_received:"/admin/incoming-emails",whatsapp_received:"/admin/whatsapp",agent_action:"/admin/ai-approvals",new_booking:"/admin/bookings",booking_payment:"/admin/bookings",payment_received:"/admin/bookings"};if(a&&i[a])return i[a];if(!t)return"/admin/ai-approvals";const n={"/guide/bookings":"/admin/bookings","/guide/":"/admin/guides","/site/login":"/admin/sites","/site/":"/admin/sites","/admin/manage-guides":"/admin/guides"};for(const[r,o]of Object.entries(n))if(t.startsWith(r))return o;return t})(t);t.read||(async e=>{try{const t=localStorage.getItem("token");await fetch(`https://balkandestination.com/api/admin/notifications/${e}/read`,{method:"PUT",headers:{Authorization:`Bearer ${t}`}}),P()}catch(t){console.error("Failed to mark as read:",t)}})(t.id),l(!1),e(a)},G=o&&(0,d.createPortal)((0,B.jsxs)("div",{ref:D,className:"w-96 bg-white rounded-lg shadow-2xl border border-gray-200 overflow-hidden",style:{position:"fixed",top:L.top,right:L.right,zIndex:999999,maxHeight:"calc(100vh - 100px)"},children:[(0,B.jsxs)("div",{className:"p-4 border-b bg-gray-50",children:[(0,B.jsxs)("div",{className:"flex justify-between items-center",children:[(0,B.jsx)("h3",{className:"font-semibold text-lg text-gray-800",children:"Notifications"}),(0,B.jsxs)("div",{className:"flex items-center gap-1",children:[t.length>0&&(0,B.jsx)("button",{onClick:()=>I(!H),className:"p-1.5 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700",title:"More actions",children:(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,B.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})}),(0,B.jsx)("button",{onClick:()=>l(!1),className:"p-1.5 hover:bg-gray-200 rounded",children:(0,B.jsx)(z.A,{className:"h-4 w-4 text-gray-500"})})]})]}),H&&t.length>0&&(0,B.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[n>0&&(0,B.jsxs)(S.$,{size:"sm",variant:"outline",onClick:async()=>{F(!0);try{const e=localStorage.getItem("token");await fetch("https://balkandestination.com/api/admin/notifications/mark-all-read",{method:"PUT",headers:{Authorization:`Bearer ${e}`}}),q.oR.success("All notifications marked as read"),P()}catch(e){q.oR.error("Failed to mark notifications as read")}finally{F(!1)}}
2,disabled:c,className:"text-xs h-7",children:[(0,B.jsx)($.A,{className:"h-3 w-3 mr-1"}),"Mark all read"]}),(0,B.jsxs)(S.$,{size:"sm",variant:"outline",onClick:async()=>{F(!0);try{const e=localStorage.getItem("token"),t=await fetch("https://balkandestination.com/api/admin/notifications/delete-read",{method:"POST",headers:{Authorization:`Bearer ${e}`}}),a=await t.json();q.oR.success(a.message||"Read notifications deleted"),P(),I(!1)}catch(e){q.oR.error("Failed to delete notifications")}finally{F(!1)}},disabled:c,className:"text-xs h-7",children:[(0,B.jsx)(R.A,{className:"h-3 w-3 mr-1"}),"Delete read"]}),(0,B.jsxs)(S.$,{size:"sm",variant:"outline",onClick:async()=>{F(!0);try{const e=localStorage.getItem("token"),t=await fetch("https://balkandestination.com/api/admin/notifications/delete-all",{method:"POST",headers:{Authorization:`Bearer ${e}`}}),a=await t.json();q.oR.success(a.message||"All notifications deleted"),P(),I(!1)}catch(e){q.oR.error("Failed to delete notifications")}finally{F(!1)}},disabled:c,className:"text-xs h-7 text-red-600 hover:text-red-700 hover:bg-red-50",children:[(0,B.jsx)(R.A,{className:"h-3 w-3 mr-1"}),"Delete all"]})]})]}),(0,B.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===t.length?(0,B.jsxs)("div",{className:"p-8 text-center text-gray-500",children:[(0,B.jsx)(C.A,{className:"h-12 w-12 mx-auto mb-3 text-gray-300"}),(0,B.jsx)("p",{children:"No notifications"})]}):(0,B.jsx)("div",{className:"divide-y divide-gray-100",children:t.map(e=>(0,B.jsx)("div",{className:`relative group w-full text-left p-4 hover:bg-blue-50 transition-all cursor-pointer border-l-4 ${e.read?"":"bg-blue-50/50"} ${U(e.priority)}`,onClick:()=>O(e),role:"button",tabIndex:0,onKeyDown:t=>"Enter"===t.key&&O(e),children:(0,B.jsxs)("div",{className:"flex gap-3",children:[(0,B.jsx)("div",{className:"flex-shrink-0 mt-1",children:T(e.type,e.message)}),(0,B.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,B.jsx)("p",{className:"text-sm text-gray-800 group-hover:text-blue-700 transition-colors "+(e.read?"":"font-semibold"),children:e.message}),(0,B.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,B.jsx)("span",{className:"text-xs text-gray-500",children:Z(e.created_at)}),!e.read&&(0,B.jsx)("span",{className:"text-xs bg-blue-500 text-white px-2 py-0.5 rounded-full",children:"New"}),"urgent"===e.priority&&(0,B.jsx)("span",{className:"text-xs bg-red-500 text-white px-2 py-0.5 rounded-full",children:"Urgent"})]}),(0,B.jsx)("p",{className:"text-xs text-blue-500 mt-1 opacity-0 group-hover:opacity-100 transition-opacity",children:"Click to view \u2192"})]}),(0,B.jsx)("button",{onClick:t=>(async(e,t)=>{t.stopPropagation();try{const t=localStorage.getItem("token");await fetch(`https://balkandestination.com/api/admin/notifications/${e}`,{method:"DELETE",headers:{Authorization:`Bearer ${t}`}}),q.oR.success("Notification deleted"),P()}catch(a){q.oR.error("Failed to delete notification")}})(e.id,t),className:"opacity-0 group-hover:opacity-100 p-1.5 hover:bg-red-100 rounded text-gray-500 hover:text-red-500 transition-all",title:"Delete notification",children:(0,B.jsx)(R.A,{className:"h-4 w-4"})})]})},e.id))})}),t.length>0&&(0,B.jsx)("div",{className:"p-3 border-t bg-gray-50 text-center",children:(0,B.jsx)("button",{onClick:()=>{l(!1),e("/admin/notifications")},className:"text-sm text-blue-600 hover:text-blue-700 font-medium",children:"Manage All Notifications"})})]}),document.body);return(0,B.jsxs)("div",{className:"relative",children:[(0,B.jsxs)("button",{ref:V,onClick:()=>l(!o),className:"relative p-2 rounded-full hover:bg-white/20 transition-colors","data-testid":"notification-bell",children:[(0,B.jsx)(C.A,{className:"h-6 w-6 text-white"}),n>0&&(0,B.jsx)("span",{className:"absolute -top-1 -right-1 bg-red-500 text-white text-xs font-bold rounded-full flex items-center justify-center animate-pulse "+(n>99?"h-6 w-auto px-1.5 min-w-[1.5rem]":n>9?"h-5 w-6":"h-5 w-5"),children:n>99?"99+":n})]}),G]})}const H=({children:e,title:t,showBackButton:a=!0})=>{const s=(0,i.Zp)(),d=(0,i.zy)(),h="/admin"===d.pathname||"/admin/"===d.pathname;return(0,B.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-indigo-50 via-blue-50 to-purple-50",children:[(0,B.jsx)("div",{className:"bg-gradient-to-r from-indigo-600 to-blue-600 text-white shadow-lg",children:(0,B.jsx)("div",{className:"container mx-auto px-4 py-4",children:(0,B.jsxs)("div",{className:"flex items-center justify-between",children:[(0,B.jsxs)("div",{className:"flex items-center gap-3",children:[a&&!h&&(0,B.jsxs)("button",{onClick:()=>{s(-1)},className:"flex items-center gap-2 px-3 py-2 bg-white/20 hover:bg-white/30 rounded-lg transition-colors backdrop-blur-sm",title:"Go Back",children:[(0,B.jsx)(n.A,{className:"h-5 w-5"}),(0,B.jsx)("span",{className:"font-medium text-sm",children:"Back"})]}),(0,B.jsx)("div",{className:"w-10 h-10 bg-white/20 rounded-lg flex items-center justify-center backdrop-blur-sm",children:(0,B.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,B.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"})})}),(0,B.jsxs)("div",{children:[(0,B.jsx)("h1",{className:"text-xl font-bold",children:"Admin Dashboard"}),(0,B.jsx)("p",{className:"text-xs text-blue-100",children:"Content Management System"})]})]}),(0,B.jsxs)("div",{className:"flex items-center gap-3",children:[(0,B.jsxs)("div",{className:"hidden md:flex items-center gap-2",children:[(0,B.jsxs)(i.N_,{to:"/",className:"flex items-center gap-1 px-3 py-1.5 bg-white/10 hover:bg-white/20 rounded-lg text-sm transition-colors",title:"Go to Homepage",children:[(0,B.jsx)(r.A,{className:"h-4 w-4"}),(0,B.jsx)("span",{children:"Home"})]}),(0,B.jsx)(i.N_,{to:"/tours",className:"flex items-center gap-1 px-3 py-1.5 bg-white/10 hover:bg-white/20 rounded-lg text-sm transition-colors",children:"Tours"}),(0,B.jsx)(i.N_,{to:"/hotels",className:"flex items-center gap-1 px-3 py-1.5 bg-white/10 hover:bg-white/20 rounded-lg text-sm transition-colors",children:"Hotels"}),(0,B.jsxs)(i.N_,{to:"/admin/pms",className:"flex items-center gap-1 px-3 py-1.5 bg-white/10 hover:bg-white/20 rounded-lg text-sm transition-colors",title:"PMS & Channel Manager","data-testid":"admin-nav-pms",children:[(0,B.jsx)(o.A,{className:"h-4 w-4"}),(0,B.jsx)("span",{children:"PMS"})]}),(0,B.jsxs)(i.N_,{to:"/admin/pending-listings",className:"flex items-center gap-1 px-3 py-1.5 bg-white/10 hover:bg-white/20 rounded-lg text-sm transition-colors",title:"Listings ready to publish","data-testid":"admin-nav-pending-listings",children:[(0,B.jsx)(l.A,{className:"h-4 w-4"}),(0,B.jsx)("span",{children:"To Publish"})]}),(0,B.jsxs)("a",{href:"/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 px-3 py-1.5 bg-green-500/80 hover:bg-green-500 rounded-lg text-sm transition-colors font-medium",title:"Open Public Site in New Tab",children:[(0,B.jsx)(c.A,{className:"h-4 w-4"}),(0,B.jsx)("span",{children:"View Site"})]})]}),(0,B.jsx)(F,{}),(0,B.jsx)("span",{className:"px-3 py-1 bg-white/20 rounded-full text-sm backdrop-blur-sm",children:"Admin Mode"})]})]})})}),(0,B.jsxs)("div",{className:"container mx-auto px-4 py-8",children:[t&&(0,B.jsxs)("div",{className:"mb-6",children:[(0,B.jsx)("h2",{className:"text-3xl font-bold text-indigo-900",style:{fontFamily:"Space Grotesk, sans-serif"},children:t}),(0,B.jsx)("div",{className:"h-1 w-20 bg-gradient-to-r from-indigo-600 to-blue-600 rounded-full mt-2"})]}),e]})]})}},63771:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("check-check",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},65469:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},70764:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},77819:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},82054:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},84669:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(77784).A)("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},86376:(e,t,a)=>{a.d(t,{A:()=>s});
2const s=(0,a(77784).A)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]])}}]);
3//# sourceMappingURL=2726.7acde8ad.chunk.js.map

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.