import * as button from '@descope-ui/descope-button/theme';
import * as text from '@descope-ui/descope-text/theme';
import * as enrichedText from '@descope-ui/descope-enriched-text/theme';
import * as link from '@descope-ui/descope-link/theme';
import * as comboBox from '@descope-ui/descope-combo-box/theme';
import * as badge from '@descope-ui/descope-badge/theme';
import * as avatar from '@descope-ui/descope-avatar/theme';
import * as icon from '@descope-ui/descope-icon/theme';
import * as image from '@descope-ui/descope-image/theme';
import * as appsList from '@descope-ui/descope-apps-list/theme';
import * as list from '@descope-ui/descope-list/theme';
import * as listItem from '@descope-ui/descope-list-item/theme';
import * as multiLineMappings from '@descope-ui/descope-multi-line-mappings/theme';
import * as multiSelectComboBox from '@descope-ui/descope-multi-select-combo-box/theme';
import * as autocompleteField from '@descope-ui/descope-autocomplete-field/theme';
import * as addressField from '@descope-ui/descope-address-field/theme';
import * as timer from '@descope-ui/descope-timer/theme';
import * as timerButton from '@descope-ui/descope-timer-button/theme';
import * as passwordStrength from '@descope-ui/descope-password-strength/theme';
import * as collapsibleContainer from '@descope-ui/descope-collapsible-container/theme';
import * as recoveryCodes from '@descope-ui/descope-recovery-codes/theme';
import * as outboundApps from '@descope-ui/descope-outbound-apps/theme';
import * as outboundAppButton from '@descope-ui/descope-outbound-app-button/theme';
import * as trustedDevices from '@descope-ui/descope-trusted-devices/theme';
import * as tooltip from '@descope-ui/descope-tooltip/theme';
import * as countrySubdivisionCityField from '@descope-ui/descope-country-subdivision-city-field/theme';
import * as attachment from '@descope-ui/descope-attachment/theme';
import * as textField from './textField';
import * as password from './password';
import * as numberField from './numberField';
import * as emailField from './emailField';
import * as textArea from './textArea';
import * as checkbox from './checkbox';
import * as switchToggle from './switchToggle';
import * as container from './container';
import * as logo from './logo';
import * as totpImage from './totpImage';
import * as notpImage from './notpImage';
import * as divider from './divider';
import * as passcode from './passcode';
import { loaderRadial, loaderLinear } from './loader';
import * as phoneField from './phoneField';
import * as phoneInputBoxField from './phoneInputBoxField';
import * as newPassword from './newPassword';
import * as inputWrapper from './inputWrapper';
import * as uploadFile from './uploadFile';
import * as buttonSelectionGroupItem from './buttonSelectionGroup/buttonSelectionGroupItem';
import * as buttonSelectionGroup from './buttonSelectionGroup/buttonSelectionGroup';
import * as buttonMultiSelectionGroup from './buttonSelectionGroup/buttonMultiSelectionGroup';
import * as modal from './modal';
import * as grid from './grid';
import * as notificationCard from './notificationCard';
import * as mappingsField from './mappingsField';
import * as userAttribute from './userAttribute';
import * as userAuthMethod from './userAuthMethod';
import * as samlGroupMappings from './samlGroupMappings';
import * as policyValidation from './policyValidation';
import * as codeSnippet from './codeSnippet';
import * as radioGroup from './radioGroup/radioGroup';
import * as radioButton from './radioGroup/radioButton';
import * as calendar from './calendar';
import * as dateField from './dateField';
import * as scopesList from './scopesList';
import * as thirdPartyAppLogo from './thirdPartyAppLogo';
import * as securityQuestionsSetup from './securityQuestionsSetup';
import * as securityQuestionsVerify from './securityQuestionsVerify';
import * as hybridField from './hybridField';
import * as alert from './alert';
import * as hcaptcha from './hcaptcha';

const components = {
  button,
  textField,
  password,
  numberField,
  emailField,
  textArea,
  checkbox,
  switchToggle,
  container,
  logo,
  totpImage,
  notpImage,
  text,
  enrichedText,
  link,
  divider,
  passcode,
  loaderRadial,
  loaderLinear,
  comboBox,
  phoneField,
  phoneInputBoxField,
  newPassword,
  inputWrapper,
  uploadFile,
  buttonSelectionGroupItem,
  buttonSelectionGroup,
  buttonMultiSelectionGroup,
  modal,
  grid,
  notificationCard,
  multiSelectComboBox,
  badge,
  avatar,
  mappingsField,
  userAttribute,
  userAuthMethod,
  samlGroupMappings,
  policyValidation,
  image,
  icon,
  codeSnippet,
  radioGroup,
  radioButton,
  calendar,
  dateField,
  list,
  listItem,
  multiLineMappings,
  appsList,
  scopesList,
  thirdPartyAppLogo,
  securityQuestionsSetup,
  securityQuestionsVerify,
  hybridField,
  alert,
  autocompleteField,
  addressField,
  countrySubdivisionCityField,
  timer,
  timerButton,
  passwordStrength,
  collapsibleContainer,
  recoveryCodes,
  hcaptcha,
  outboundApps,
  outboundAppButton,
  trustedDevices,
  tooltip,
  attachment,
};

const theme = Object.keys(components).reduce(
  (acc, comp) => ({ ...acc, [comp]: components[comp].default }),
  {}
);
const vars = Object.keys(components).reduce(
  (acc, comp) => ({ ...acc, [comp]: components[comp].vars }),
  {}
);

export default theme;
export { vars };
