import{bw as u,ct as d,bC as j,bD as l,r as b,q as g,s as o,j as s,L as P}from"./index-dP1W1_bd.js";import{u as f}from"./useDownload-C3yCvYJa.js";import{P as x}from"./ProjectForm-DftUkOfx.js";import"./useProject-CXVt1xnE.js";import"./length-BzpOfCdE.js";import"./utils-3BV3J1PE.js";import"./storage-connector-BuEuJyVA.js";import"./FileUploaderButton-frSujVRY.js";import"./uniq-98MdbBvs.js";import"./uniqBy-6mvKp2Ip.js";import"./dumbPluralize-CcxDsNiu.js";import"./zipObj-DEkcXp9d.js";const q=()=>{const{id:i,project:t,isLoading:a,isFetching:m}=f(),r=u(),[e,{isLoading:c}]=d();j(`${l.editProject} ${(t==null?void 0:t.projectName)??""}`);const n=b.useCallback(async p=>{await e({id:+i,data:{services:[],...p}}).unwrap(),r(g(o.project.view,o.project.value,{id:i}))},[e,r,i]);return a||m?s.jsx(P,{}):s.jsx(x,{isLoading:c,isEdit:!0,initialData:t,onSubmit:n})};export{q as default};
