(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8391],{3235:(e,t,l)=>{Promise.resolve().then(l.bind(l,41558))},24035:(e,t,l)=>{"use strict";l.d(t,{A:()=>c});var a=l(1521);let r=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),s=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,l)=>l?l.toUpperCase():t.toLowerCase()),i=e=>{let t=s(e);return t.charAt(0).toUpperCase()+t.slice(1)},d=function(){for(var e=arguments.length,t=Array(e),l=0;l<e;l++)t[l]=arguments[l];return t.filter((e,t,l)=>!!e&&""!==e.trim()&&l.indexOf(e)===t).join(" ").trim()},n=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var o={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 m=(0,a.forwardRef)((e,t)=>{let{color:l="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:m="",children:c,iconNode:u,...h}=e;return(0,a.createElement)("svg",{ref:t,...o,width:r,height:r,stroke:l,strokeWidth:i?24*Number(s)/Number(r):s,className:d("lucide",m),...!c&&!n(h)&&{"aria-hidden":"true"},...h},[...u.map(e=>{let[t,l]=e;return(0,a.createElement)(t,l)}),...Array.isArray(c)?c:[c]])}),c=(e,t)=>{let l=(0,a.forwardRef)((l,s)=>{let{className:n,...o}=l;return(0,a.createElement)(m,{ref:s,iconNode:t,className:d("lucide-".concat(r(i(e))),"lucide-".concat(e),n),...o})});return l.displayName=i(e),l}},24891:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});let a=(0,l(24035).A)("camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]])},41558:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>n});var a=l(73365),r=l(1521),s=l(25826),i=l(24891);function d(){let[e,t]=(0,r.useState)({fullName:"Admin John",mobile:"+254-700000000",email:"admin@healthsys.com",role:"System Administrator",department:"ICT"}),[l,d]=(0,r.useState)(!1),[n,o]=(0,r.useState)("/images/admin-banner.jpg"),m=e=>{let{name:l,value:a}=e.target;t(e=>({...e,[l]:a}))};return(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,a.jsx)("h2",{className:"text-2xl font-bold",children:"Admin Profile"}),(0,a.jsx)("button",{onClick:()=>d(!l),className:"bg-blue-600 text-white px-4 py-1 rounded-md hover:bg-blue-700",children:l?"Cancel":"Edit Profile"})]}),(0,a.jsx)("div",{className:"flex justify-center mb-6 relative",children:(0,a.jsxs)("div",{className:"relative w-32 h-32",children:[(0,a.jsx)(s.default,{src:n,alt:"Admin Avatar",fill:!0,className:"rounded-full object-cover border-4 border-white shadow-lg"}),l&&(0,a.jsxs)("label",{className:"absolute bottom-0 right-0 bg-white p-1 rounded-full shadow cursor-pointer",children:[(0,a.jsx)(i.A,{className:"w-5 h-5 text-gray-700"}),(0,a.jsx)("input",{type:"file",accept:"image/*",onChange:e=>{let t=e.target.files[0];t&&o(URL.createObjectURL(t))},className:"hidden"})]})]})}),(0,a.jsxs)("form",{onSubmit:t=>{t.preventDefault(),console.log("Admin data submitted:",e),d(!1)},className:"bg-white rounded-xl shadow-md p-4 space-y-6",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium",children:"Full Name"}),(0,a.jsx)("input",{type:"text",name:"fullName",value:e.fullName,onChange:m,disabled:!l,className:"w-full mt-1 p-2 border rounded-md"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium",children:"Mobile"}),(0,a.jsx)("input",{type:"text",name:"mobile",value:e.mobile,onChange:m,disabled:!l,className:"w-full mt-1 p-2 border rounded-md"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium",children:"Email"}),(0,a.jsx)("input",{type:"email",name:"email",value:e.email,onChange:m,disabled:!l,className:"w-full mt-1 p-2 border rounded-md"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium",children:"Role"}),(0,a.jsx)("input",{type:"text",name:"role",value:e.role,onChange:m,disabled:!l,className:"w-full mt-1 p-2 border rounded-md"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium",children:"Department"}),(0,a.jsx)("input",{type:"text",name:"department",value:e.department,onChange:m,disabled:!l,className:"w-full mt-1 p-2 border rounded-md"})]})]}),l&&(0,a.jsx)("div",{className:"pt-4",children:(0,a.jsx)("button",{type:"submit",className:"bg-green-600 text-white px-6 py-2 rounded-md hover:bg-green-700",children:"Save Changes"})})]})]})}function n(){let[e,t]=(0,r.useState)(!1);return(0,a.jsx)(d,{})}}},e=>{var t=t=>e(e.s=t);e.O(0,[5826,2347,4870,7358],()=>t(3235)),_N_E=e.O()}]);