import{c as b,j as e}from"./index-D9pJRAs5.js";import{r as n}from"./vendor-D6aTFYy9.js";import{B as y,ax as p,o as l,n as f}from"./ui-CtYVlq7P.js";import"./pdf-Bz_mU5mG.js";const v=()=>{const{companyInfo:d,updateCompanyInfo:o}=b(),[a,c]=n.useState(d),[m,t]=n.useState(!1),r=s=>{const{name:g,value:x}=s.target;c(u=>({...u,[g]:x}))},i=s=>{s.preventDefault(),o(a),t(!0),setTimeout(()=>t(!1),3e3)};return e.jsxs("div",{className:"space-y-6",children:[e.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Company Information"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Update your company's public details and banking information."}),e.jsxs("form",{onSubmit:i,className:"space-y-8",children:[e.jsxs("div",{className:"p-6 border border-gray-200 dark:border-gray-700 rounded-lg",children:[e.jsx("h3",{className:"text-lg font-medium text-gray-800 dark:text-gray-200 mb-4",children:"Contact Details"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Company Name"}),e.jsxs("div",{className:"relative",children:[e.jsx(y,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-5 w-5 text-gray-400"}),e.jsx("input",{type:"text",name:"name",value:a.name,onChange:r,className:"w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700 focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Phone Number"}),e.jsxs("div",{className:"relative",children:[e.jsx(p,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-5 w-5 text-gray-400"}),e.jsx("input",{type:"text",name:"phone",value:a.phone,onChange:r,className:"w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700 focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Address"}),e.jsx("textarea",{name:"address",value:a.address,onChange:r,rows:3,className:"w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700 focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]})]}),e.jsxs("div",{className:"p-6 border border-gray-200 dark:border-gray-700 rounded-lg",children:[e.jsx("h3",{className:"text-lg font-medium text-gray-800 dark:text-gray-200 mb-4",children:"Banking Information"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Bank Name"}),e.jsxs("div",{className:"relative",children:[e.jsx(l,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-5 w-5 text-gray-400"}),e.jsx("input",{type:"text",name:"bank",value:a.bank,onChange:r,className:"w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700 focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Account Number"}),e.jsxs("div",{className:"relative",children:[e.jsx(l,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-5 w-5 text-gray-400"}),e.jsx("input",{type:"text",name:"accountNumber",value:a.accountNumber,onChange:r,className:"w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700 focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]})]})]}),e.jsxs("div",{className:"flex justify-end items-center",children:[m&&e.jsx("span",{className:"text-green-600 mr-4 text-sm",children:"Changes saved successfully!"}),e.jsxs("button",{type:"submit",className:"px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors flex items-center space-x-2",children:[e.jsx(f,{className:"h-4 w-4"}),e.jsx("span",{children:"Save Changes"})]})]})]})]})};export{v as default};
