import { App } from 'vue';

import BmsButton from './components/button/BmsButton.vue';
import BmsIconButton from './components/button/BmsIconButton.vue';
import BmsToggleIcon from './components/button/BmsToggleIcon.vue';

import BmsAlert from './components/feedback/BmsAlert.vue';
import BmsBadge from './components/feedback/BmsBadge.vue';
import BmsCaption from './components/feedback/BmsCaption.vue';
import BmsCircularProgress from './components/feedback/BmsCircularProgress.vue';
import BmsGhost from '@/components/feedback/BmsGhost.vue';
import BmsLoader from './components/feedback/BmsLoader.vue';
import BmsTooltip from './components/feedback/BmsTooltip.vue';

import BmsAutocomplete from './components/form/BmsAutocomplete.vue';
import BmsServerAutocomplete from '@/components/form/BmsServerAutocomplete.vue';
import BmsBetweenInput from './components/form/BmsBetweenInput.vue';
import BmsChip from './components/form/BmsChip.vue';
import BmsFilePicker from './components/form/BmsFilePicker.vue';
import BmsInputBooleanCheckbox from './components/form/BmsInputBooleanCheckbox.vue';
import BmsInputCheckboxGroup from './components/form/BmsInputCheckboxGroup.vue';
import BmsInputCheckboxCaption from './components/form/BmsInputCheckboxCaption.vue';
import BmsInputCheckboxCaptionGroup from './components/form/BmsInputCheckboxCaptionGroup.vue';
import BmsInputCode from './components/form/BmsInputCode.vue';
import BmsInputDateTime from './components/form/BmsInputDateTime.vue';
import BmsInputFile from './components/form/BmsInputFile.vue';
import BmsInputNumber from './components/form/BmsInputNumber.vue';
import BmsInputRadio from './components/form/BmsInputRadio.vue';
import BmsInputRadioGroup from './components/form/BmsInputRadioGroup.vue';
import BmsInputRadioCaption from './components/form/BmsInputRadioCaption.vue';
import BmsInputRadioCaptionGroup from './components/form/BmsInputRadioCaptionGroup.vue';
import BmsInputText from './components/form/BmsInputText.vue';
import BmsInputToggle from '@/components/form/BmsInputToggle.vue';
import BmsMultiSelect from '@/components/form/BmsMultiSelect.vue';
import BmsSearch from './components/form/BmsSearch.vue';
import BmsSelect from './components/form/BmsSelect.vue';
import BmsCombobox from './components/form/BmsCombobox.vue';
import BmsTag from './components/form/BmsTag.vue';
import BmsTextArea from './components/form/BmsTextArea.vue';
import BmsInputTime from './components/form/BmsInputTime.vue';

import BmsContentPageLayout from './components/layout/BmsContentPageLayout.vue';
import BmsCard from './components/layout/BmsCard.vue';
import BmsFloatingWindow from './components/layout/BmsFloatingWindow.vue';
import BmsForm from './components/layout/BmsForm.vue';
import BmsHeader from './components/layout/BmsHeader.vue';
import BmsHeaderTitle from './components/layout/BmsHeaderTitle.vue';
import BmsModal from './components/layout/BmsModal.vue';
import BmsOverlay from './components/layout/BmsOverlay.vue';
import BmsSection from './components/layout/BmsSection.vue';
import BmsSidePanel from './components/layout/BmsSidePanel.vue';
import BmsSlidingPanelShell from './components/layout/BmsSlidingPanelShell.vue';
import BmsSplitWindow from './components/layout/BmsSplitWindow.vue';
import BmsStep from './components/layout/BmsStep.vue';
import BmsStepper from './components/layout/BmsStepper.vue';

import BmsBackButton from './components/navigation/BmsBackButton.vue';
import BmsBreadcrumb from './components/navigation/BmsBreadcrumb.vue';
import BmsFixedMenu from './components/navigation/BmsFixedMenu.vue';
import BmsLink from './components/navigation/BmsLink.vue';
import BmsMenu from './components/navigation/BmsMenu.vue';
import BmsMenuNav from './components/navigation/BmsMenuNav.vue';
import BmsShortLinkMenu from './components/navigation/BmsShortLinkMenu.vue';
import BmsTabs from './components/navigation/BmsTabs.vue';
import BmsTenantSwitcher from './components/navigation/BmsTenantSwitcher.vue';

import BmsDraggableList from './components/table/DraggableList.vue';
import BmsEmptyScreen from './components/table/BmsEmptyScreen.vue';
import BmsPagination from './components/table/BmsPagination.vue';
import BmsServerTable from './components/table/BmsServerTable.vue';
import BmsTable from './components/table/BmsTable.vue';

import BmsCocarde from './components/utils/BmsCocarde.vue';
import BmsProblem from './components/utils/BmsProblem.vue';
import BmsRelativeTime from './components/utils/BmsRelativeTime.vue';

import './assets/scss/app.scss';

export const createBmsUi = () => ({
  install: (app: App) => {
    app.component('BmsButton', BmsButton);
    app.component('BmsIconButton', BmsIconButton);
    app.component('BmsToggleIcon', BmsToggleIcon);

    app.component('BmsAlert', BmsAlert);
    app.component('BmsBadge', BmsBadge);
    app.component('BmsCaption', BmsCaption);
    app.component('BmsCircularProgress', BmsCircularProgress);
    app.component('BmsGhost', BmsGhost);
    app.component('BmsLoader', BmsLoader);
    app.component('BmsTooltip', BmsTooltip);

    app.component('BmsAutocomplete', BmsAutocomplete);
    app.component('BmsServerAutocomplete', BmsServerAutocomplete);

    app.component('BmsBetweenInput', BmsBetweenInput);
    app.component('BmsChip', BmsChip);
    app.component('BmsFilePicker', BmsFilePicker);
    app.component('BmsInputBooleanCheckbox', BmsInputBooleanCheckbox);
    app.component('BmsInputCheckboxGroup', BmsInputCheckboxGroup);
    app.component('BmsInputCheckboxCaption', BmsInputCheckboxCaption);
    app.component('BmsInputCheckboxCaptionGroup', BmsInputCheckboxCaptionGroup);
    app.component('BmsInputCode', BmsInputCode);
    app.component('BmsInputDateTime', BmsInputDateTime);
    app.component('BmsInputFile', BmsInputFile);
    app.component('BmsInputNumber', BmsInputNumber);
    app.component('BmsInputRadio', BmsInputRadio);
    app.component('BmsInputRadioGroup', BmsInputRadioGroup);
    app.component('BmsInputRadioCaption', BmsInputRadioCaption);
    app.component('BmsInputRadioCaptionGroup', BmsInputRadioCaptionGroup);
    app.component('BmsInputText', BmsInputText);
    app.component('BmsInputToggle', BmsInputToggle);
    app.component('BmsMultiSelect', BmsMultiSelect);
    app.component('BmsSearch', BmsSearch);
    app.component('BmsSelect', BmsSelect);
    app.component('BmsCombobox', BmsCombobox);
    app.component('BmsTag', BmsTag);
    app.component('BmsTextArea', BmsTextArea);
    app.component('BmsInputTime', BmsInputTime);

    app.component('BmsContentPageLayout', BmsContentPageLayout);
    app.component('BmsCard', BmsCard);
    app.component('BmsFloatingWindow', BmsFloatingWindow);
    app.component('BmsForm', BmsForm);
    app.component('BmsHeader', BmsHeader);
    app.component('BmsHeaderTitle', BmsHeaderTitle);
    app.component('BmsModal', BmsModal);
    app.component('BmsOverlay', BmsOverlay);
    app.component('BmsSection', BmsSection);
    app.component('BmsSidePanel', BmsSidePanel);
    app.component('BmsSlidingPanelShell', BmsSlidingPanelShell);
    app.component('BmsSplitWindow', BmsSplitWindow);
    app.component('BmsStep', BmsStep);
    app.component('BmsStepper', BmsStepper);

    app.component('BmsBackButton', BmsBackButton);
    app.component('BmsBreadcrumb', BmsBreadcrumb);
    app.component('BmsFixedMenu', BmsFixedMenu);
    app.component('BmsLink', BmsLink);
    app.component('BmsMenu', BmsMenu);
    app.component('BmsMenuNav', BmsMenuNav);
    app.component('BmsShortLinkMenu', BmsShortLinkMenu);
    app.component('BmsTabs', BmsTabs);
    app.component('BmsTenantSwitcher', BmsTenantSwitcher);

    app.component('BmsDraggableList', BmsDraggableList);
    app.component('BmsEmptyScreen', BmsEmptyScreen);
    app.component('BmsPagination', BmsPagination);
    app.component('BmsServerTable', BmsServerTable);
    app.component('BmsTable', BmsTable);

    app.component('BmsCocarde', BmsCocarde);
    app.component('BmsProblem', BmsProblem);
    app.component('BmsRelativeTime', BmsRelativeTime);
  },
});

export * from './composables';
export * from './components/form/bms-input-code.linters';
export * from './helpers';
export * from './models';
export * from './plugins/feature-flipper';
export * from './plugins/field';
export * from './plugins/keycloak-auth-adapter';
export * from './plugins/notifications';
export * from './plugins/confirm';
export * from './plugins/runtime-env';
export * from './plugins/router-history';
export * from './services';
export {
  BmsButton,
  BmsIconButton,
  BmsToggleIcon,
  BmsAlert,
  BmsBadge,
  BmsCaption,
  BmsCircularProgress,
  BmsGhost,
  BmsLoader,
  BmsTooltip,
  BmsAutocomplete,
  BmsServerAutocomplete,
  BmsBetweenInput,
  BmsChip,
  BmsFilePicker,
  BmsInputBooleanCheckbox,
  BmsInputCheckboxGroup,
  BmsInputCheckboxCaption,
  BmsInputCheckboxCaptionGroup,
  BmsInputCode,
  BmsInputDateTime,
  BmsInputFile,
  BmsInputNumber,
  BmsInputRadio,
  BmsInputRadioGroup,
  BmsInputRadioCaption,
  BmsInputRadioCaptionGroup,
  BmsInputText,
  BmsInputTime,
  BmsInputToggle,
  BmsMultiSelect,
  BmsSearch,
  BmsSelect,
  BmsCombobox,
  BmsTag,
  BmsTextArea,
  BmsContentPageLayout,
  BmsCard,
  BmsFloatingWindow,
  BmsForm,
  BmsHeader,
  BmsHeaderTitle,
  BmsModal,
  BmsOverlay,
  BmsSection,
  BmsSidePanel,
  BmsSlidingPanelShell,
  BmsSplitWindow,
  BmsStep,
  BmsStepper,
  BmsBackButton,
  BmsBreadcrumb,
  BmsFixedMenu,
  BmsLink,
  BmsMenu,
  BmsMenuNav,
  BmsShortLinkMenu,
  BmsTabs,
  BmsTenantSwitcher,
  BmsDraggableList,
  BmsEmptyScreen,
  BmsPagination,
  BmsServerTable,
  BmsTable,
  BmsCocarde,
  BmsProblem,
  BmsRelativeTime,
};
