1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7328],{16252:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(52297).A)("stethoscope",[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]])},52297:(e,r,t)=>{"use strict";t.d(r,{A:()=>x});var s=t(40452);let a=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),i=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase()),o=e=>{let r=i(e);return r.charAt(0).toUpperCase()+r.slice(1)},l=function(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return r.filter((e,r,t)=>!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim()},n=e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0};var d={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let c=(0,s.forwardRef)((e,r)=>{let{color:t="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:c="",children:x,iconNode:h,...m}=e;return(0,s.createElement)("svg",{ref:r,...d,width:a,height:a,stroke:t,strokeWidth:o?24*Number(i)/Number(a):i,className:l("lucide",c),...!x&&!n(m)&&{"aria-hidden":"true"},...m},[...h.map(e=>{let[r,t]=e;return(0,s.createElement)(r,t)}),...Array.isArray(x)?x:[x]])}),x=(e,r)=>{let t=(0,s.forwardRef)((t,i)=>{let{className:n,...d}=t;return(0,s.createElement)(c,{ref:i,iconNode:r,className:l("lucide-".concat(a(o(e))),"lucide-".concat(e),n),...d})});return t.displayName=o(e),t}},56407:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>m});var s=t(43400),a=t(40452),i=t(2289),o=t.n(i),l=t(66089),n=t(49296),d=t(70121),c=t(38312),x=t(61867),h=t(16252);function m(){let{isConnected:e}=(0,l.F)(),{credential:r,isLoading:t}=(0,d.Xm)(),{prescriptionIds:i,isLoading:m,refetch:g}=(0,c.VX)(),{statuses:u}=(0,c.Mo)(i||[]),b=(null==r?void 0:r.credentialType)===x.aG.Doctor,p=(null==r?void 0:r.isActive)&&BigInt(Date.now())<1000n*r.expiresAt;if((0,a.useEffect)(()=>{console.log("[DoctorDashboard] Is Connected:",e),console.log("[DoctorDashboard] Credential Loading:",t),console.log("[DoctorDashboard] Credential:",r),console.log("[DoctorDashboard] Is Doctor:",b),console.log("[DoctorDashboard] Has Valid Credential:",p),r&&(console.log("[DoctorDashboard] Credential Details:"),console.log(" - Type:",r.credentialType===x.aG.Doctor?"Doctor":"Other"),console.log(" - Is Active:",r.isActive),console.log(" - Expires At:",new Date(1e3*Number(r.expiresAt)).toISOString()),console.log(" - Current Time:",new Date().toISOString()),console.log(" - Is Expired:",BigInt(Date.now())>=1000n*r.expiresAt))},[e,t,r,b,p]),!e)return(0,s.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 via-white to-purple-50 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900",children:[(0,s.jsx)("header",{className:"sticky top-0 z-50 border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900/80 backdrop-blur-md shadow-sm",children:(0,s.jsx)("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-4",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)(o(),{href:"/",className:"flex items-center gap-3 hover:opacity-80 transition-opacity",children:[(0,s.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-blue-600 to-purple-600 rounded-lg flex items-center justify-center",children:(0,s.jsx)("span",{className:"text-white font-bold text-lg","aria-hidden":"true",children:"M"})}),(0,s.jsx)("span",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"MedChain"})]}),(0,s.jsx)(n.k,{})]})})}),(0,s.jsx)("main",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-16",children:(0,s.jsxs)("div",{className:"max-w-2xl mx-auto text-center",children:[(0,s.jsx)("div",{className:"w-20 h-20 bg-gradient-to-br from-blue-500 to-purple-500 rounded-full flex items-center justify-center mx-auto mb-6",children:(0,s.jsx)("svg",{className:"w-10 h-10 text-white",f
1ill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2m2 4h10a2 2 0 002-2v-6a2 2 0 00-2-2H9a2 2 0 00-2 2v6a2 2 0 002 2zm7-5a2 2 0 11-4 0 2 2 0 014 0z"})})}),(0,s.jsx)("h2",{className:"text-3xl font-bold mb-4 dark:text-gray-100",children:"Connect Your Wallet"}),(0,s.jsx)("p",{className:"text-gray-600 dark:text-gray-300 mb-8",children:"Please connect your wallet to access the doctor dashboard and manage prescriptions."}),(0,s.jsx)(n.k,{})]})})]});if(t)return(0,s.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 via-white to-purple-50 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900",children:[(0,s.jsx)("header",{className:"sticky top-0 z-50 border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900/80 backdrop-blur-md shadow-sm",children:(0,s.jsx)("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-4",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)(o(),{href:"/",className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-blue-600 to-purple-600 rounded-lg flex items-center justify-center",children:(0,s.jsx)("span",{className:"text-white font-bold text-lg","aria-hidden":"true",children:"M"})}),(0,s.jsx)("span",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"MedChain"})]}),(0,s.jsx)(n.k,{})]})})}),(0,s.jsx)("main",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-16",children:(0,s.jsxs)("div",{className:"max-w-2xl mx-auto text-center",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-gradient-to-br from-blue-500 to-purple-500 rounded-full mb-6 animate-pulse",children:(0,s.jsx)("svg",{className:"w-8 h-8 text-white animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),(0,s.jsx)("p",{className:"text-gray-600 dark:text-gray-300 text-lg",role:"status","aria-live":"polite",children:"Loading credential information..."})]})})]});if(!b||!p)return(0,s.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-red-50 via-white to-orange-50 dark:from-red-900/30 dark:via-gray-800 dark:to-orange-900/30",children:[(0,s.jsx)("header",{className:"sticky top-0 z-50 border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900/80 backdrop-blur-md shadow-sm",children:(0,s.jsx)("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-4",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)(o(),{href:"/",className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-blue-600 to-purple-600 rounded-lg flex items-center justify-center",children:(0,s.jsx)("span",{className:"text-white font-bold text-lg","aria-hidden":"true",children:"M"})}),(0,s.jsx)("span",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"MedChain"})]}),(0,s.jsx)(n.k,{})]})})}),(0,s.jsx)("main",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-16",children:(0,s.jsxs)("div",{className:"max-w-2xl mx-auto text-center",children:[(0,s.jsx)("div",{className:"w-20 h-20 bg-gradient-to-br from-red-500 to-orange-500 rounded-full flex items-center justify-center mx-auto mb-6",children:(0,s.jsx)("svg",{className:"w-10 h-10 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),(0,s.jsx)("h2",{className:"text-3xl font-bold mb-4 text-red-600 dark:text-red-400",children:"Access Denied"}),(0,s.jsx)("p",{className:"text-gray-700 dark:text-gray-300 mb-8",children:"You need a valid Doctor credential to access this dashboard. Please ensure you have completed KYC verification."}),(0,s.jsxs)(o(),{href:"/",className:"inline-flex items-center gap-2 bg-gradient-to-r from-blue-600 to-purple-600 text-white px-6 py-3 rounded-xl hover:from-blue-700 hover:to-purple-700 transition-all shadow-lg hover:shadow-xl font-medium",children:[(0,s.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})}),(0,s.jsx)("span",{children:"Return to Home"})]})]})})]});let f=e=>{let r={[x.Jt.Active]:"bg-gradient-to-r from-green-50 to-emerald-50 dark:from-gray-700 dark:to-gray-800 text-green-800 dark:text-green-200 border border-green-200",[x.Jt.Dispensed]:"bg-gradient-to-r from-blue-50 to-cyan-50 text-blue-800 dark:text-blue-200 border border-blue-200",[x.Jt.Cancelled]:"bg-gradient-to-r from-red-50 dark:from-red-900/30 to-rose-50 text-red-800 dark:text-red-200 border border-red-200",[x.Jt.Expired]:"bg-gradient-to-r from-gray-50 to-slate-50 text-gray-800 dark:text-gray-200 border border-gray-200"},t={[x.Jt.Active]:"Active",[x.Jt.Dispensed]:"Dispensed",[x.Jt.Cancelled]:"Cancelled",[x.Jt.Expired]:"Expired"},a={[x.Jt.Active]:"â",[x.Jt.Dispensed]:"â",[x.Jt.Cancelled]:"â",[x.Jt.Expired]:"â±"};return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold ".concat(r[e]),children:[(0,s.jsx)("span",{"aria-hidden":"true",children:a[e]}),(0,s.jsx)("span",{children:t[e]})]})};return(0,s.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-slate-100 dar
1k:from-gray-900 dark:via-gray-800 dark:to-gray-900",children:[(0,s.jsx)("header",{className:"sticky top-0 z-50 border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900/80 backdrop-blur-md shadow-sm",children:(0,s.jsx)("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-4",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)(o(),{href:"/",className:"flex items-center gap-3 hover:opacity-80 transition-opacity focus:outline-none focus:ring-2 focus:ring-blue-500 rounded-lg","aria-label":"Go to home",children:[(0,s.jsx)("div",{className:"w-10 h-10 bg-blue-600 dark:bg-blue-700 rounded-lg flex items-center justify-center",children:(0,s.jsx)("span",{className:"text-white font-bold text-lg","aria-hidden":"true",children:"M"})}),(0,s.jsx)("span",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"MedChain"})]}),(0,s.jsx)(n.k,{})]})})}),(0,s.jsx)("main",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-8",children:(0,s.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,s.jsx)("div",{className:"mb-10",children:(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,s.jsx)("div",{className:"w-12 h-12 bg-blue-600 dark:bg-blue-700 rounded-xl flex items-center justify-center",children:(0,s.jsx)(h.A,{className:"w-6 h-6 text-white"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-3xl sm:text-4xl font-bold text-gray-900 dark:text-gray-100",children:"Doctor Dashboard"}),(0,s.jsx)("p",{className:"text-gray-600 dark:text-gray-300 mt-1",children:(0,s.jsx)("span",{className:"font-semibold text-blue-600 dark:text-blue-400",children:r.specialty})})]})]})}),(0,s.jsxs)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6 mb-10",children:[(0,s.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-lg hover:shadow-xl transition-shadow border border-gray-100 dark:border-gray-700 p-6 group",children:[(0,s.jsx)("div",{className:"flex items-start justify-between mb-4",children:(0,s.jsx)("div",{className:"w-12 h-12 bg-blue-50 dark:bg-blue-900/30 rounded-xl flex items-center justify-center group-hover:scale-110 transition-transform",children:(0,s.jsx)("svg",{className:"w-6 h-6 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})})}),(0,s.jsx)("div",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-2",children:"Total Prescriptions"}),(0,s.jsx)("div",{className:"text-4xl font-bold text-gray-900 dark:text-gray-100",children:(null==i?void 0:i.length)||0}),(0,s.jsx)("div",{className:"mt-3 text-xs text-gray-500 dark:text-gray-400",children:"All time prescriptions issued"})]}),(0,s.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-lg hover:shadow-xl transition-shadow border border-gray-100 dark:border-gray-700 p-6 group",children:[(0,s.jsx)("div",{className:"flex items-start justify-between mb-4",children:(0,s.jsx)("div",{className:"w-12 h-12 bg-blue-50 dark:bg-blue-900/30 rounded-xl flex items-center justify-center group-hover:scale-110 transition-transform",children:(0,s.jsx)("svg",{className:"w-6 h-6 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})})}),(0,s.jsx)("div",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-2",children:"Active Prescriptions"}),(0,s.jsx)("div",{className:"text-4xl font-bold text-gray-900 dark:text-gray-100",children:(null==u?void 0:u.filter(e=>e===x.Jt.Active).length)||0}),(0,s.jsx)("div",{className:"mt-3 text-xs text-gray-500 dark:text-gray-400",children:"Ready to be dispensed"})]}),(0,s.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-lg hover:shadow-xl transition-shadow border border-gray-100 dark:border-gray-700 p-6 group sm:col-span-2 lg:col-span-1",children:[(0,s.jsx)("div",{className:"flex items-start justify-between mb-4",children:(0,s.jsx)("div",{className:"w-12 h-12 bg-gray-100 dark:bg-gray-700 rounded-xl flex items-center justify-center group-hover:scale-110 transition-transform",children:(0,s.jsx)("svg",{className:"w-6 h-6 text-gray-700 dark:text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})})}),(0,s.jsx)("div",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-2",children:"Dispensed"}),(0,s.jsx)("div",{className:"text-4xl font-bold text-gray-900 dark:text-gray-100",children:(null==u?void 0:u.filter(e=>e===x.Jt.Dispensed).length)||0}),(0,s.jsx)("div",{className:"mt-3 text-xs text-gray-500 dark:text-gray-400",children:"Successfully fulfilled"})]})]}),(0,s.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-100 dark:border-gray-700 mb-10 overflow-hidden",children:[(0,s.jsx)("div",{className:"bg-slate-50 dark:bg-gray-800 px-6 py-5 border-b border-gray-200 dark:border-gray-700",children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-10 h-10 bg-blue-600 dar
1k:bg-blue-700 rounded-lg flex items-center justify-center",children:(0,s.jsx)("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),(0,s.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"Quick Actions"})]})}),(0,s.jsxs)("div",{className:"p-6",children:[(0,s.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4 mb-6",children:[(0,s.jsxs)(o(),{href:"/doctor/create",className:"group flex items-center gap-4 bg-blue-600 hover:bg-blue-700 dark:bg-blue-700 dark:hover:bg-blue-800 text-white p-6 rounded-xl transition-all shadow-lg hover:shadow-xl transform hover:scale-105 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-700","aria-label":"Create new prescription",children:[(0,s.jsx)("div",{className:"w-12 h-12 bg-white/20 rounded-lg flex items-center justify-center group-hover:scale-110 transition-transform",children:(0,s.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("div",{className:"font-semibold text-lg mb-1",children:"Create Prescription"}),(0,s.jsx)("div",{className:"text-blue-100 text-sm",children:"Issue a new verified prescription"})]}),(0,s.jsx)("svg",{className:"w-5 h-5 group-hover:translate-x-1 transition-transform",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]}),(0,s.jsxs)(o(),{href:"/doctor/lookup",className:"group flex items-center gap-4 bg-white dark:bg-gray-800 border-2 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 p-6 rounded-xl hover:border-blue-400 dark:hover:border-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900/10 transition-all shadow-lg hover:shadow-xl transform hover:scale-105 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-700","aria-label":"Lookup patient history",children:[(0,s.jsx)("div",{className:"w-12 h-12 bg-gray-100 dark:bg-gray-700 rounded-lg flex items-center justify-center group-hover:scale-110 transition-transform",children:(0,s.jsx)("svg",{className:"w-6 h-6 text-gray-700 dark:text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("div",{className:"font-semibold text-lg mb-1",children:"Patient History"}),(0,s.jsx)("div",{className:"text-gray-600 dark:text-gray-300 text-sm",children:"Search medical records"})]}),(0,s.jsx)("svg",{className:"w-5 h-5 text-gray-700 dark:text-gray-300 group-hover:translate-x-1 transition-transform",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]}),(0,s.jsxs)("div",{className:"flex items-start gap-3 p-4 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-xl",children:[(0,s.jsx)("svg",{className:"w-5 h-5 text-blue-600 dark:text-blue-400 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,s.jsxs)("div",{className:"text-sm text-blue-900 dark:text-blue-100",children:[(0,s.jsx)("strong",{className:"font-semibold",children:"Best Practice:"})," Always review patient history before issuing prescriptions to detect potential drug interactions or abuse patterns."]})]})]})]}),(0,s.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-100 dark:border-gray-700 overflow-hidden",children:[(0,s.jsx)("div",{className:"bg-slate-50 dark:bg-gray-800 px-6 py-5 border-b border-gray-200 dark:border-gray-700",children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-10 h-10 bg-blue-600 dar
1k:bg-blue-700 rounded-lg flex items-center justify-center",children:(0,s.jsx)("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,s.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"My Prescriptions"})]}),i&&i.length>0&&(0,s.jsxs)("button",{onClick:()=>g(),className:"flex items-center gap-2 px-4 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-600 transition-colors text-sm font-medium text-gray-700 dark:text-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Refresh prescriptions list",children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),(0,s.jsx)("span",{children:"Refresh"})]})]})}),(0,s.jsx)("div",{className:"p-6",children:m?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-16",role:"status","aria-live":"polite",children:[(0,s.jsx)("div",{className:"w-16 h-16 bg-gradient-to-br from-blue-500 to-purple-500 rounded-full flex items-center justify-center mb-4 animate-pulse",children:(0,s.jsx)("svg",{className:"w-8 h-8 text-white animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),(0,s.jsx)("p",{className:"text-gray-600 dark:text-gray-300 font-medium",children:"Loading prescriptions..."})]}):i&&i.length>0?(0,s.jsx)("div",{className:"space-y-3",children:i.map((e,r)=>(0,s.jsx)("div",{className:"group border-2 border-gray-200 dark:border-gray-700 rounded-xl p-5 hover:border-blue-300 dark:hover:border-blue-600 hover:bg-blue-50/50 dark:hover:bg-blue-900/20 transition-all",children:(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,s.jsx)("div",{className:"flex-1",children:(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,s.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-blue-100 to-purple-100 rounded-lg flex items-center justify-center",children:(0,s.jsxs)("span",{className:"text-lg font-bold text-blue-700",children:["#",e.toString()]})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"font-semibold text-lg text-gray-900 dark:text-gray-100",children:["Prescription #",e.toString()]}),(0,s.jsx)("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Tap to view full details and patient information"})]})]})}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[u&&void 0!==u[r]&&f(u[r]),(0,s.jsxs)(o(),{href:"/doctor/prescription/".concat(e),className:"inline-flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-blue-600 to-purple-600 text-white rounded-lg hover:from-blue-700 hover:to-purple-700 transition-all shadow-md hover:shadow-lg font-medium text-sm focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"View details for prescription ".concat(e.toString()),children:[(0,s.jsx)("span",{children:"View"}),(0,s.jsx)("svg",{className:"w-4 h-4 group-hover:translate-x-0.5 transition-transform",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]})]})},e.toString()))}):(0,s.jsxs)("div",{className:"text-center py-16",children:[(0,s.jsx)("div",{className:"w-20 h-20 bg-gradient-to-br from-gray-100 to-gray-200 rounded-full flex items-center justify-center mx-auto mb-6",children:(0,s.jsx)("svg",{className:"w-10 h-10 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,s.jsx)("h3",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100 mb-2",children:"No Prescriptions Yet"}),(0,s.jsx)("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:"You haven't created any prescriptions yet. Start by creating your first prescription."}),(0,s.jsxs)(o(),{href:"/doctor/create",className:"inline-flex items-center gap-2 bg-gradient-to-r from-blue-600 to-purple-600 text-white px-6 py-3 rounded-xl hover:from-blue-700 hover:to-purple-700 transition-all shadow-lg hover:shadow-xl font-medium",children:[(0,s.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),(0,s.jsx)("span",{children:"Create First Prescription"})]})]})})]})]})})]})}},76196:(e,r,t)=>{Promise.resolve().then(t.bind(t,56407))}},e=>{var r=r=>e(e.s=r);e.O(0,[1619,8571,54,2434,5995,8092,4797,8312,8041,7627,7358],()=>r(76196)),_N_E=e.O()}]);
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.