import{t as e}from"./useQuery-Dt4yOFcF.js";import{x as t}from"./index-t_-MMk0R.js";function n(n){return e({queryKey:[`division_aens`,n??`all`],queryFn:async()=>{let e=t.from(`division_aens`).select(`*`).order(`division`).order(`sort_order`);n&&(e=e.eq(`division`,n));let{data:r,error:i}=await e;if(i)throw i;return r??[]}})}function r(n,r){return e({queryKey:[`aen_uploads`,n??`all`,r??`all`],queryFn:async()=>{let e=t.from(`uploads`).select(`*`).not(`aen`,`is`,null).order(`year`,{ascending:!1}).order(`month`,{ascending:!1}).order(`version`,{ascending:!1});n&&(e=e.eq(`division`,n)),r&&(e=e.eq(`aen`,r));let{data:i,error:a}=await e;if(a)throw a;return i??[]}})}export{n,r as t};