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:[`reading-list`],queryFn:()=>r.get(`/api/v1/items/reading-list`)})}function a(){return t({queryKey:[`read-list`],queryFn:()=>r.get(`/api/v1/items/read`)})}function o(){let t=e();return n({mutationFn:({id:e,type:t,add:n})=>{let i=t===`item`?`/api/v1/items/${e}`:`/api/v1/notes/${e}`;return r.patch(i,{reading_status:n?`reading_list`:`unread`})},onSuccess:()=>{t.invalidateQueries({queryKey:[`reading-list`]}),t.invalidateQueries({queryKey:[`read-list`]}),t.invalidateQueries({queryKey:[`items`]}),t.invalidateQueries({queryKey:[`notes`]})}})}function s(){let t=e();return n({mutationFn:({id:e,type:t})=>{let n=t===`item`?`/api/v1/items/${e}`:`/api/v1/notes/${e}`;return r.patch(n,{reading_status:`read`})},onSuccess:()=>{t.invalidateQueries({queryKey:[`reading-list`]}),t.invalidateQueries({queryKey:[`read-list`]}),t.invalidateQueries({queryKey:[`items`]}),t.invalidateQueries({queryKey:[`notes`]})}})}export{o as i,a as n,i as r,s as t};