import { defineNuxtPlugin } from "#app";
import Employee from "@/components/viewer/Employee.vue";
import Kpi from "@/components/viewer/Kpi.vue";
import Salary from "@/components/viewer/Salary.vue";
import Dashboard from "@/components/viewer/Dashboard.vue";
import HRM from "@/components/viewer/HRM.vue";
import Rollcall from "@/components/viewer/Rollcall.vue";
import Notebox from "~/components/common/Notebox.vue";
import ProductCountbox from "~/components/common/ProductCountbox.vue";
import SvgIcon from "~/components/SvgIcon.vue";
import DataView from "~/components/datatable/DataView.vue";
import PivotDataView from "~/components/datatable/PivotDataView.vue";
import PickDay from "~/components/datepicker/PickDay.vue";
import Datepicker from "~/components/datepicker/Datepicker.vue";
import ImageGallery from "~/components/media/ImageGallery.vue";
import FileGallery from "~/components/media/FileGallery.vue";
import FileUpload from "~/components/media/FileUpload.vue";
import FileShow from "~/components/media/FileShow.vue";
import ChipImage from "~/components/media/ChipImage.vue";
import Avatarbox from "~/components/common/Avatarbox.vue";
import Email from "~/components/marketing/email/Email.vue";
import ViewList from "~/components/common/ViewList.vue";

import Configuration from "~/components/maintab/Configuration.vue";
import DebtView from "~/components/accounting/DebtView.vue";

//format
import FormatNumber from "~/components/datatable/format/FormatNumber.vue";
import FormatDate from "~/components/datatable/format/FormatDate.vue";
import DataTable from "~/components/datatable/DataTable.vue";
import DataModel from "~/components/datatable/DataModel.vue";
import InputNumber from "~/components/common/InputNumber.vue";
import ColorText from "~/components/datatable/format/ColorText.vue";

//menu
import MenuAction from "~/components/menu/MenuAction.vue";
import MenuApp from "~/components/menu/MenuApp.vue";
import MenuCust from "~/components/menu/MenuCust.vue";
import MenuPhone from "~/components/menu/MenuPhone.vue";
import MenuParam from "~/components/menu/MenuParam.vue";
import MenuAdd from "~/components/menu/MenuAdd.vue";
import MenuCollab from "~/components/menu/MenuCollab.vue";
import MenuNote from "~/components/menu/MenuNote.vue";
import MenuPayment from "~/components/menu/MenuPayment.vue";
import ScrollBox from "~/components/datatable/ScrollBox.vue";
import Product from "~/components/product/Product.vue";
import Reservation from "~/components/modal/Reservation.vue";
import UserMainTab from "~/components/modal/UserMainTab.vue";
import PaymentSchedule from "~/components/application/PaymentSchedule.vue";
import CountWithAdd from "~/components/common/CountWithAdd.vue";
import CalculationView from "~/components/application/CalculationView.vue";
import InternalAccount from "~/components/accounting/InternalAccount.vue";
import MenuAccount from "~/components/menu/MenuAccount.vue";
import PhaseAdvance from "~/components/application/PhaseAdvance.vue";
import ImageLayout from "@/components/media/ImageLayout.vue";
import Cart from "~/components/product/Cart.vue";
import CountdownTimer from "~/components/common/CountdownTimer.vue";
import CustomerInfo2 from "~/components/customer/CustomerInfo2.vue";
import MenuFile from "~/components/menu/MenuFile.vue";
import Rights from "@/components/viewer/Rights.vue";

const components = {
  DebtView,
  PivotDataView,
  PaymentSchedule,
  CustomerInfo2,
  CountdownTimer,
  PhaseAdvance,
  ViewList,
  ColorText,
  CalculationView,
  CountWithAdd,
  Reservation,
  Notebox,
  ProductCountbox,
  MenuAction,
  Email,
  SvgIcon,
  Datepicker,
  PickDay,
  ImageGallery,
  FileGallery,
  FileUpload,
  FileShow,
  DataView,
  ChipImage,
  Avatarbox,
  DataTable,
  Configuration,
  InputNumber,
  MenuPhone,
  MenuParam,
  ScrollBox,
  MenuPayment,
  DataModel,
  FormatNumber,
  FormatDate,
  MenuApp,
  MenuCust,
  MenuAdd,
  MenuCollab,
  MenuNote,
  Product,
  UserMainTab,
  InternalAccount,
  MenuAccount,
  ImageLayout,
  Cart,
  MenuFile,
  Dashboard,
  HRM,
  Rollcall,
  Salary,
  Kpi,
  Employee,
  Rights,
};

export default defineNuxtPlugin((nuxtApp) => {
  Object.entries(components).forEach(([name, component]) => {
    nuxtApp.vueApp.component(name, component);
  });
});
