(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1775],{37787:(e,t,a)=>{Promise.resolve().then(a.bind(a,71550))},71550:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>i});var s=a(73365),r=a(1521),l=a(25826);function n(){let[e,t]=(0,r.useState)(!1),[a,n]=(0,r.useState)("/images/patient1.jpg"),[i,d]=(0,r.useState)({current:"",new:"",confirm:""});(0,r.useEffect)(()=>{"dark"===localStorage.getItem("theme")&&(t(!0),document.documentElement.classList.add("dark"))},[]);let c=e=>{d({...i,[e.target.name]:e.target.value})};return(0,s.jsxs)("div",{className:"bg-white white:bg-gray rounded-xl shadow p-6 max-w-3xl left mx",children:[(0,s.jsx)("h2",{className:"text-2xl font-bold mb-6 text-gray white:text-white",children:"Settings"}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("label",{className:"block text-gray white:text-gray mb-2",children:"Profile Image"}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[a&&(0,s.jsx)(l.default,{src:a,alt:"Profile",width:80,height:80,className:"rounded-full object-cover"}),(0,s.jsx)("input",{type:"file",accept:"image/*",onChange:e=>{let t=e.target.files[0];t&&n(URL.createObjectURL(t))}})]})]}),(0,s.jsx)("div",{className:"mb-6",children:(0,s.jsxs)("label",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",className:"hidden",checked:e,onChange:()=>{let a=!e;t(a),document.documentElement.classList.toggle("dark",a),localStorage.setItem("theme",a?"dark":"light")}}),(0,s.jsx)("div",{className:"w-10 h-5 bg-gray-500 white:bg-gray-900 rounded-full relative",children:(0,s.jsx)("div",{className:"absolute top-0.5 left-0.5 w-4 h-4 bg-dark dark:bg-gray-200 rounded-full shadow-md transform transition ".concat(e?"translate-x-5":"")})}),(0,s.jsx)("span",{className:"ml-3 text-gray white:text-gray",children:e?"Dark Mode":"Light Mode"})]})}),(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault(),console.log("Password update:",i)},children:[(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)("label",{className:"block text-gray white:text-gray mb-1",children:"Current Password"}),(0,s.jsx)("input",{type:"password",name:"current",value:i.current,onChange:c,className:"w-full px-3 py-2 rounded border white:bg-gray white:text-white",required:!0})]}),(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)("label",{className:"block text-gray white:text-gray mb-1",children:"New Password"}),(0,s.jsx)("input",{type:"password",name:"new",value:i.new,onChange:c,className:"w-full px-3 py-2 rounded border white:bg-gray white:text-white",required:!0})]}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("label",{className:"block text-gray white:text-gray mb-1",children:"Confirm New Password"}),(0,s.jsx)("input",{type:"password",name:"confirm",value:i.confirm,onChange:c,className:"w-full px-3 py-2 rounded border white:bg-gray white:text-white",required:!0})]}),(0,s.jsx)("button",{type:"submit",className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded",children:"Update Password"})]})]})}function i(){let[e,t]=(0,r.useState)(!1);return(0,s.jsx)(n,{})}}},e=>{var t=t=>e(e.s=t);e.O(0,[5826,2347,4870,7358],()=>t(37787)),_N_E=e.O()}]);