import{aw as j,bo as m,cw as p,bx as l,by as b,r as g,s as x,t as i,j as r,D as P}from"./index-_eM6l4Nf.js";import{P as f}from"./ProjectForm-P40vIxQJ.js";const E=()=>{const{id:e,project:t,isLoading:o,isFetching:c}=j(),a=m(),[s,{isLoading:n}]=p();l(`${b.editProject} ${(t==null?void 0:t.projectName)??""}`);const u=g.useCallback(async d=>{await s({id:+e,data:{services:[],...d}}).unwrap(),a(x(i.project.prj.view,i.project.value,{id:e}))},[s,a,e]);return o||c?r.jsx(P,{}):r.jsx(f,{isLoading:n,isEdit:!0,initialData:t,onSubmit:u})};export{E as default};
