import{j as e,H as i}from"./app-BRoRPa4x.js";import{A as d}from"./AdminLayout-DCcA2Aje.js";import{F as l}from"./ClipboardDocumentCheckIcon-C7bssDMr.js";import"./Dropdown-B4bpLCgK.js";import"./transition-u43f5Dc-.js";import"./proxy-iYr3ghlA.js";import"./sweetalert2.esm.all-UgF8mXO5.js";import"./ChevronRightIcon-BDYMGWwz.js";const n=({bookingDetail:a})=>{const{booking:s,service:t}=a,r=s.user;return e.jsx("li",{className:"bg-white shadow-sm rounded-lg overflow-hidden hover:shadow-md transition-shadow duration-300",children:e.jsx("div",{className:"p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-lg font-semibold text-gray-900 truncate",children:t.name}),e.jsx("div",{className:"mt-2 flex items-center text-sm text-gray-500",children:e.jsxs("span",{className:"truncate",children:["Patient: ",r.name]})}),e.jsxs("p",{className:"mt-1 text-sm text-gray-500",children:["Booking Date: ",new Date(s.booking_date).toLocaleDateString()]})]}),e.jsx("div",{className:"flex items-center space-x-6 ml-4",children:e.jsx("div",{className:"text-right",children:e.jsx("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium ${s.status==="confirmed"?"bg-green-100 text-green-800":s.status==="pending"?"bg-yellow-100 text-yellow-800":"bg-red-100 text-red-800"}`,children:s.status})})})]})})})};function p({auth:a,serviceBookings:s}){return e.jsxs(d,{user:a.user,header:e.jsxs("div",{children:[e.jsx("h2",{className:"font-semibold text-2xl text-gray-800 leading-tight",children:"Doctor's Dashboard"}),e.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Your assigned service bookings."})]}),children:[e.jsx(i,{title:"Doctor's Dashboard"}),e.jsx("div",{className:"py-6",children:e.jsxs("div",{className:"mx-auto sm:px-6 lg:px-8",children:[e.jsx("div",{className:"flex justify-between items-center mb-6",children:e.jsx("h3",{className:"text-2xl font-bold text-gray-900",children:"Assigned Service Bookings"})}),e.jsx("div",{className:"bg-white shadow-lg rounded-lg overflow-hidden",children:s.data.length>0?e.jsx("ul",{className:"divide-y divide-gray-200",children:s.data.map(t=>e.jsx(n,{bookingDetail:t},t.id))}):e.jsxs("div",{className:"text-center py-12",children:[e.jsx(l,{className:"mx-auto h-12 w-12 text-gray-400"}),e.jsx("h3",{className:"mt-2 text-sm font-medium text-gray-900",children:"No assigned bookings"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"You have no service bookings assigned to you yet."})]})}),s.links&&s.links.length>3&&e.jsx("div",{className:"mt-6 flex justify-center",children:s.links.map((t,r)=>e.jsx(Link,{href:t.url||"#",className:`mr-1 mb-1 px-4 py-3 text-sm leading-4 border rounded-md transition-colors duration-150 ${t.active?"bg-emerald-600 text-white border-emerald-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"} ${t.url?"":"opacity-50 cursor-not-allowed"}`,dangerouslySetInnerHTML:{__html:t.label}},r))})]})})]})}export{p as default};
