import{i as e,t}from"./useQuery-qKYvnzn0.js";import{t as n}from"./useMutation-C6r_dxL-.js";import{t as r}from"./client-BAPwymp0.js";function i(){return t({queryKey:[`collections`],queryFn:()=>r.get(`/api/v1/collections`)})}function a(){let t=e();return n({mutationFn:e=>r.post(`/api/v1/collections`,e),onSuccess:()=>t.invalidateQueries({queryKey:[`collections`]})})}function o(){let t=e();return n({mutationFn:({collectionId:e,itemIds:t})=>r.post(`/api/v1/collections/${e}/items`,{item_ids:t}),onSuccess:(e,n)=>{t.invalidateQueries({queryKey:[`collections`]}),t.invalidateQueries({queryKey:[`collection`,n.collectionId]}),t.invalidateQueries({queryKey:[`item-collections`]})}})}function s(){let t=e();return n({mutationFn:({collectionId:e,noteIds:t})=>r.post(`/api/v1/collections/${e}/notes`,{note_ids:t}),onSuccess:(e,n)=>{t.invalidateQueries({queryKey:[`collections`]}),t.invalidateQueries({queryKey:[`collection`,n.collectionId]})}})}export{a as i,s as n,i as r,o as t};