import { F as c, h as s } from "./global-loader-CbmVhJAK.js";
import { defineStore as a } from "pinia";
import { ref as n } from "vue";
import { useSnackbar as m } from "@feedmepos/ui-library";
const h = () => {
  const e = {
    fetchType: c.Get,
    url: "/schemas"
  };
  return s.fetch(e);
}, f = "mf-reportschema-store", l = a(f, () => {
  const e = n([]), r = m();
  async function t() {
    try {
      e.value = await h();
    } catch (o) {
      console.log(o), r.open({
        title: "Get Schema Error",
        message: "Internal Server Error",
        type: "error"
      });
    }
  }
  return {
    schemas: e,
    getSchema: t
  };
});
export {
  l as u
};
