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 InternalEntry from "~/components/modal/InternalEntry.vue"

import Configuration from "~/components/maintab/Configuration.vue";
import DebtView from "~/components/accounting/DebtView.vue";
import ReportDaily from "~/components/report/Daily.vue";
import ReportFormTo from "~/components/report/FromTo.vue";
import ReportMonthly from "~/components/report/Monthly.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 TransactionFiles from "~/components/transaction/TransactionFiles.vue";
import PaymentSchedule from "~/components/application/PaymentSchedule.vue";
import TransactionView from "~/components/transaction/TransactionView.vue";
import ContractPaymentUpload from "~/components/application/ContractPaymentUpload.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 ProjectDocuments from '~/components/product/ProjectDocuments.vue';
import ProductEdit from '~/components/product/ProductEdit.vue';

import ProductHandover from '~/components/product/ProductHandover.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 DebtProduct from '~/components/accounting/DebtProduct.vue'
import DebtCustomer from '~/components/accounting/DebtCustomer.vue'
import Due from '~/components/debt/Due.vue';
import Overdue from '@/components/debt/Overdue.vue';
import DebtSendEmail from '@/components/debt/DebtSendEmail.vue';
import DebtCheckbox from '@/components/debt/DebtCheckbox.vue';
import Allocate from '@/components/transaction/Allocate.vue';
import Handover from '~/components/handover/Handover.vue'
import HandoverSendEmail from '@/components/handover/HandoverSendEmail.vue';
import HandoverCheckbox from '@/components/handover/HandoverCheckbox.vue';
import HandoverStatus from '@/components/handover/HandoverStatus.vue';
import CountDown from '@/components/dialog/CountDown.vue';

const components = {
  DebtView,
  PivotDataView,
  PaymentSchedule,
  CustomerInfo2,
  CountdownTimer,
  PhaseAdvance,
  InternalEntry,
  ViewList,
  ColorText,
  CalculationView,
  CountWithAdd,
  ContractPaymentUpload,
  TransactionView,
  TransactionFiles,
  Reservation,
  Notebox,
  ProductCountbox,
  MenuAction,
  Email,
  SvgIcon,
  Datepicker,
  PickDay,
  ImageGallery,
  FileGallery,
  FileUpload,
  FileShow,
  DataView,
  ChipImage,
  Avatarbox,
  DataTable,
  Configuration,
  InputNumber,
  MenuPhone,
  MenuParam,
  ScrollBox,
  MenuPayment,
  ReportDaily,
  ReportFormTo,
  ReportMonthly,
  DataModel,
  FormatNumber,
  FormatDate,
  MenuApp,
  MenuCust,
  MenuAdd,
  MenuCollab,
  MenuNote,
  Product,
  UserMainTab,
  InternalAccount,
  MenuAccount,
  ImageLayout,
  ProjectDocuments,
  Cart,
  MenuFile,
  DebtProduct,
  DebtCustomer,
  Due,
  Overdue,
  DebtSendEmail,
  DebtCheckbox,
  ProductHandover,
  Allocate,
  Handover,
  HandoverSendEmail,
  HandoverCheckbox,
  HandoverStatus,
  Dashboard,
  HRM,
  Rollcall,
  Salary,
  Kpi,
  Employee
};

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