import{u as g,a as p,aA as x,cV as _,j as e,C as h,dn as j,c_ as v,dp as m,dq as C,a3 as b}from"./bundle.CHKSNOJF.js";import{D as y}from"./DesignSelector-DZnt3FOv.js";import"./designs-64NZ6YEW.js";function M(){const[a]=g(),l=p(),d=x(),c=_(),{recurringInvoice:i,errors:n,setRecurringInvoice:t}=c,r=(s,u)=>{t(o=>o&&{...o,[s]:u})};return e.jsx(h,{title:a("settings"),className:"shadow-sm",style:{borderColor:l.$24},headerStyle:{borderColor:l.$20},children:e.jsx("div",{className:"flex justify-center w-full pb-10 pt-2",children:e.jsxs("div",{className:"grid grid-cols-12 gap-4 px-6 w-full xl:w-2/3",children:[e.jsxs("div",{className:"col-span-12 lg:col-span-6 space-y-6",children:[e.jsx("div",{className:"space-y-2",children:e.jsx(j,{inputLabel:a("project"),value:i?.project_id,onChange:s=>r("project_id",s.id),errorMessage:n?.errors.project_id})}),e.jsx(v,{label:a("exchange_rate"),value:i?.exchange_rate||1,onValueChange:s=>r("exchange_rate",parseFloat(s)),errorMessage:n?.errors.exchange_rate,disablePrecision:!0}),e.jsx("div",{className:"space-y-2",children:e.jsx(y,{inputLabel:a("design"),value:i?.design_id,onChange:s=>r("design_id",s.id),onClearButtonClick:()=>r("design_id",""),disableWithQueryParameter:!0,errorMessage:n?.errors.design_id})})]}),e.jsxs("div",{className:"col-span-12 lg:col-span-6 space-y-6",children:[e.jsx("div",{className:"space-y-2",children:e.jsx(m,{inputLabel:a("assigned_user"),value:i?.assigned_user_id,onChange:s=>r("assigned_user_id",s.id),errorMessage:n?.errors.assigned_user_id,readonly:!d("edit_recurring_invoice")})}),e.jsx("div",{className:"space-y-2",children:e.jsx(C,{inputLabel:a("vendor"),value:i?.vendor_id,onChange:s=>r("vendor_id",s.id),onClearButtonClick:()=>r("vendor_id",""),errorMessage:n?.errors.vendor_id})}),e.jsx("div",{className:"lg:pt-[1.8rem]",children:e.jsx(b,{label:a("inclusive_taxes"),checked:i?.uses_inclusive_taxes||!1,onChange:s=>r("uses_inclusive_taxes",s)})})]})]})})})}export{M as default};
