import{aR as d,cl as p,aX as j,aY as l,r as g,g as P,e as r,j as s,a_ as f}from"./index-d6499a22.js";import{u as x}from"./useCurrentProject-b23444be.js";import{P as v}from"./ProjectForm-3f30231f.js";import"./useProject-0d0fdeb3.js";import"./utils-2832fe88.js";import"./FileUploaderButton-c4f1b533.js";import"./useDownload-7167ff3b.js";import"./props-01648cd9.js";import"./zipObj-e651182a.js";const R=()=>{const{id:i,project:t,isLoading:o,isFetching:c}=x(),a=d(),[e,{isLoading:n}]=p();j(`${l.editProject} ${(t==null?void 0:t.projectName)??""}`);const m=g.useCallback(async u=>{await e({id:+i,data:{services:[],...u}}).unwrap(),a(P(r.project.view,r.project.value,{id:i}))},[e,a,i]);return o||c?s.jsx(f,{}):s.jsx(v,{isLoading:n,isEdit:!0,initialData:t,onSubmit:m})};export{R as default};
