import { createApp } from "vue";
import App from "@/App.vue";
import { registerPlugins } from "@core/utils/plugins";
import "gridstack/dist/gridstack.min.css";

import "ag-grid-community/styles/ag-grid.css";
import "ag-grid-community/styles/ag-theme-alpine.css";
import "@styles/ag-grid-overrides.scss";

import "@core-scss/template/index.scss";
import "@styles/styles.scss";

import Highcharts from "highcharts";
import HighchartsVue from "highcharts-vue";
import * as Sankey from "highcharts/modules/sankey";
import * as Organization from "highcharts/modules/organization";
import * as Accessibility from "highcharts/modules/accessibility";

const plug = m => (typeof m === "function" ? m : m && typeof m.default === "function" ? m.default : null);
plug(Sankey)?.(Highcharts);
plug(Organization)?.(Highcharts);
plug(Accessibility)?.(Highcharts);

const app = createApp(App);
registerPlugins(app);
app.use(HighchartsVue);
app.mount("#app");
