1import{u as n}from"./useQuery-BWnxGLDx.js";import{m as u,s as a}from"./index-DvwP-Zr8.js";import{u as i}from"./useMutation-DCabkvd2.js";function f(){return n({queryKey:["pages"],queryFn:async()=>{const{data:e,error:r}=await a.from("pages").select("*").order("title",{ascending:!0});if(r)throw r;return e}})}function l(){return n({queryKey:["pages","admin"],queryFn:async()=>{const{data:e,error:r}=await a.from("pages").select("*").order("title",{ascending:!0});if(r)throw r;return e}})}function d(e){return n({queryKey:["pages",e],queryFn:async()=>{const{data:r,error:t}=await a.from("pages").select("*").eq("slug",e).single();if(t)throw t;return r},enabled:!!e})}function p(){const e=u();return i({mutationFn:async r=>{const{data:t,error:s}=await a.from("pages").insert(r).select().single();if(s)throw s;return t},onSuccess:()=>{e.invalidateQueries({queryKey:["pages"]})}})}function m(){const e=u();return i({mutationFn:async({id:r,...t})=>{const{data:s,error:o}=await a.from("pages").update(t).eq("id",r).select().single();if(o)throw o;return s},onSuccess:()=>{e.invalidateQueries({queryKey:["pages"]})}})}function q(){const e=u();return i({mutationFn:async r=>{const{error:t}=await a.from("pages").delete().eq("id",r);if(t)throw t},onSuccess:()=>{e.invalidateQueries({queryKey:["pages"]})}})}export{p as a,m as b,q as c,d,f as e,l as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.