1import{u as p}from"./useQuery-BujisQX_.js";import{aa as t,D as s,Q as i}from"./index-CxTzo_i5.js";import{u}from"./useMutation-nYJy1ouO.js";function d(){return p({queryKey:["pricing-plans"],queryFn:async()=>{const{data:e,error:r}=await s.from("pricing_plans").select("*").order("sort_order",{ascending:!0});if(r)throw r;return e}})}function y(){const e=t();return u({mutationFn:async r=>{const{id:n,...a}=r,{data:o,error:c}=await s.from("pricing_plans").update(a).eq("id",n).select().single();if(c)throw c;return o},onSuccess:()=>{e.invalidateQueries({queryKey:["pricing-plans"]}),i.success("Pricing berhasil diperbarui")},onError:r=>{i.error("Gagal memperbarui pricing: "+r.message)}})}function f(){const e=t();return u({mutationFn:async r=>{const{data:n,error:a}=await s.from("pricing_plans").insert(r).select().single();if(a)throw a;return n},onSuccess:()=>{e.invalidateQueries({queryKey:["pricing-plans"]}),i.success("Paket pricing berhasil ditambahkan")},onError:r=>{i.error("Gagal menambah pricing: "+r.message)}})}function h(){const e=t();return u({mutationFn:async r=>{const{error:n}=await s.from("pricing_plans").delete().eq("id",r);if(n)throw n},onSuccess:()=>{e.invalidateQueries({queryKey:["pricing-plans"]}),i.success("Paket pricing berhasil dihapus")},onError:r=>{i.error("Gagal menghapus pricing: "+r.message)}})}export{y as a,f as b,h as c,d 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.