import { defineNuxtPlugin } from "#app";
import Dashboard from "@/components/dashboard/Dashboard.vue";
import Orders from "@/components/orders/Orders.vue";
import Inventory from "@/components/inventory/Inventory.vue";
import Rights from "@/components/rights/Rights.vue";
import POS from "@/components/pos/POS.vue";
import CreateReceipts from "@/components/receipts/CreateReceipts.vue";
import Return from "@/components/receipts/Return.vue";
import Imports from "@/components/imports/Imports.vue";
import AddProduct from "@/components/imports/AddProduct.vue";
import ProductForm from "@/components/imports/ProductForm.vue";
import ProductVariantForm from "@/components/imports/ProductVariantForm.vue";
import EditProductButton from "@/components/imports/EditProductButton.vue";
import DeleteProduct from "@/components/imports/DeleteProduct.vue";
import AddOS from "@/components/imports/addons/AddOS.vue";
import AddManufacturer from "@/components/imports/addons/AddManufacturer.vue";
import AddBattery from "@/components/imports/addons/AddBattery.vue";
import AddScreen from "@/components/imports/addons/AddScreen.vue";
import AddCPU from "@/components/imports/addons/AddCPU.vue";
import AddGPU from "@/components/imports/addons/AddGPU.vue";
import AddCamera from "@/components/imports/addons/AddCamera.vue";
import AddSIM from "@/components/imports/addons/AddSIM.vue";
import AddNetworkTechnology from "@/components/imports/addons/AddNetworkTechnology.vue";
import AddChargingTechnology from "@/components/imports/addons/AddChargingTechnology.vue";
import AddExternalStorage from "@/components/imports/addons/AddExternalStorage.vue";
import AddIPRating from "@/components/imports/addons/AddIPRating.vue";
import AddDesign from "@/components/imports/addons/AddDesign.vue";
import AddColor from "@/components/imports/addons/AddColor.vue";
import AddRAM from "@/components/imports/addons/AddRAM.vue";
import AddInternalStorage from "@/components/imports/addons/AddInternalStorage.vue";
import Color from "@/components/imports/Color.vue";
import IMEIButton from "@/components/imports/IMEIButton.vue";
import IMEIs from "@/components/imports/IMEIs.vue";
import DeleteProductVariant from "@/components/imports/DeleteProductVariant.vue";
import ProductImage from "@/components/imports/ProductImage.vue";
import Returns from "@/components/imports/Returns.vue";
import Exports from "@/components/exports/Exports.vue";
import ExportsDamaged from "@/components/exports/ExportsDamaged.vue";
import ExportsInternal from "@/components/exports/ExportsInternal.vue";
import ExportsAssembled from "@/components/exports/ExportsAssembled.vue";
import InventoryTransfer from "@/components/inventory-transfer/InventoryTransfer.vue";
import CashBook from "@/components/cash-book/CashBook.vue";
import NCC from "@/components/report/NCC.vue";
import Customers from "@/components/report/Customers.vue";
import Goods from "@/components/report/Goods.vue";
import ReportCashBook from "@/components/report/CashBook.vue";
import Finance from "@/components/report/Finance.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";

// 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 Reservation from "@/components/modal/Reservation.vue";
import UserMainTab from "@/components/modal/UserMainTab.vue";
import CountWithAdd from "@/components/common/CountWithAdd.vue";
import MenuAccount from "@/components/menu/MenuAccount.vue";
import ImageLayout from "@/components/media/ImageLayout.vue";

import CountdownTimer from "@/components/common/CountdownTimer.vue";
import CustomerInfo2 from "@/components/customer/CustomerInfo2.vue";
import MenuFile from "@/components/menu/MenuFile.vue";

const components = {
  PivotDataView,
  CustomerInfo2,
  CountdownTimer,
  InternalEntry,
  ViewList,
  ColorText,
  CountWithAdd,
  Reservation,
  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,
  UserMainTab,
  MenuAccount,
  ImageLayout,
  MenuFile,
  Dashboard,
  Orders,
  Inventory,
  Rights,
  POS,
  CreateReceipts,
  Return,
  Imports,
  AddProduct,
  ProductForm,
  ProductVariantForm,
  EditProductButton,
  DeleteProduct,
  AddOS,
  AddManufacturer,
  AddBattery,
  AddScreen,
  AddCPU,
  AddGPU,
  AddCamera,
  AddSIM,
  AddNetworkTechnology,
  AddChargingTechnology,
  AddExternalStorage,
  AddIPRating,
  AddDesign,
  AddColor,
  AddRAM,
  AddInternalStorage,
  Color,
  IMEIButton,
  IMEIs,
  DeleteProductVariant,
  ProductImage,
  Returns,
  Exports,
  ExportsDamaged,
  ExportsInternal,
  ExportsAssembled,
  InventoryTransfer,
  CashBook,
  NCC,
  Customers,
  Goods,
  ReportCashBook,
  Finance,
};

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