import{ee as n,ax as I,u,r as t,f1 as v,f2 as p}from"./index-46ma1THH.js";const F=(r=n.td)=>{const{data:{id:o}={}}=I(),{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(f=>{e.setInfo({userId:o,projectId:+s,data:f})},[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};
