import{aq as f,u,r as t,dq as n,ef as v,eg as p}from"./index-CK33qGU_.js";const F=(r=n.td)=>{const{data:{id:o}={}}=f(),{id:s}=u(),e=t.useMemo(()=>r===n.td?v:p,[r]),c=t.useMemo(()=>e.getInfo({userId:o,projectId:+s}),[s,e,o]),a=t.useCallback(I=>{e.setInfo({userId:o,projectId:+s,data:I})},[s,e,o]),d=t.useCallback(()=>{e.delete({userId:o,projectId:+s})},[s,e,o]);return[c,a,d]},m=(r,o=n.td,s=!1)=>{const[e,c]=F(o);t.useEffect(()=>{if(!s){const a=e?{...e,...r}:r;c(a)}},[s,o,r,c,e])};export{F as a,m as u};
