import{b4 as p,c2 as d,bb as j,bc as b,r as l,o as g,q as o,j as a,L as P}from"./index-CK33qGU_.js";import{u as f}from"./useDownload-hrjXceJg.js";import{P as x}from"./ProjectForm-CZu67CSM.js";import"./useProject-BzBQtp4J.js";import"./length-fOfC3W0h.js";import"./utils-LzNCUvhl.js";import"./storage-connector-BuEuJyVA.js";import"./FileUploaderButton-Bppadu35.js";import"./dumbPluralize-CcxDsNiu.js";import"./props-DsctD44O.js";import"./zipObj-DQ8OxaYj.js";const q=()=>{const{id:i,project:t,isLoading:s,isFetching:c}=f(),r=p(),[e,{isLoading:m}]=d();j(`${b.editProject} ${(t==null?void 0:t.projectName)??""}`);const n=l.useCallback(async u=>{await e({id:+i,data:{services:[],...u}}).unwrap(),r(g(o.project.view,o.project.value,{id:i}))},[e,r,i]);return s||c?a.jsx(P,{}):a.jsx(x,{isLoading:m,isEdit:!0,initialData:t,onSubmit:n})};export{q as default};
