import globals from '../globals';
import { getThemeRefs } from '../../helpers/themeHelpers';
import { PasswordClass } from '../../components/descope-password/PasswordClass';
import { refs } from './inputWrapper';

const globalRefs = getThemeRefs(globals);
const vars = PasswordClass.cssVarList;

const password = {
  [vars.hostWidth]: refs.width,
  [vars.hostMinWidth]: refs.minWidth,
  [vars.hostDirection]: refs.direction,
  [vars.fontSize]: refs.fontSize,
  [vars.fontFamily]: refs.fontFamily,
  [vars.labelFontSize]: refs.labelFontSize,
  [vars.labelFontWeight]: refs.labelFontWeight,
  [vars.inputValueFontWeight]: refs.inputValueFontWeight,
  [vars.inputPlaceholderFontWeight]: refs.inputPlaceholderFontWeight,
  [vars.helperTextFontWeight]: refs.helperTextFontWeight,
  [vars.errorMessageFontWeight]: refs.errorMessageFontWeight,
  [vars.labelTextColor]: refs.labelTextColor,
  [vars.errorMessageTextColor]: refs.errorMessageTextColor,
  [vars.inputHorizontalPadding]: refs.horizontalPadding,
  [vars.inputHeight]: refs.inputHeight,
  [vars.inputBackgroundColor]: refs.backgroundColor,
  [vars.labelRequiredIndicator]: refs.requiredIndicator,
  [vars.inputValueTextColor]: refs.valueTextColor,
  [vars.inputPlaceholderTextColor]: refs.placeholderTextColor,
  [vars.inputBorderWidth]: refs.borderWidth,
  [vars.inputBorderStyle]: refs.borderStyle,
  [vars.inputBorderColor]: refs.borderColor,
  [vars.inputBorderRadius]: refs.borderRadius,
  [vars.inputOutlineWidth]: refs.outlineWidth,
  [vars.inputOutlineStyle]: refs.outlineStyle,
  [vars.inputOutlineColor]: refs.outlineColor,
  [vars.inputOutlineOffset]: refs.outlineOffset,
  [vars.revealButtonOffset]: globalRefs.spacing.md,
  [vars.revealButtonSize]: refs.toggleButtonSize,
  [vars.revealButtonColor]: refs.placeholderTextColor,
  [vars.labelPosition]: refs.labelPosition,
  [vars.labelTopPosition]: refs.labelTopPosition,
  [vars.labelHorizontalPosition]: refs.labelHorizontalPosition,
  [vars.inputTransformY]: refs.inputTransformY,
  [vars.inputTransition]: refs.inputTransition,
  [vars.marginInlineStart]: refs.marginInlineStart,
  [vars.placeholderOpacity]: refs.placeholderOpacity,
  [vars.inputVerticalAlignment]: refs.inputVerticalAlignment,
  [vars.valueInputHeight]: refs.valueInputHeight,

  // error message icon
  [vars.errorMessageIcon]: refs.errorMessageIcon,
  [vars.errorMessageIconSize]: refs.errorMessageIconSize,
  [vars.errorMessageIconPadding]: refs.errorMessageIconPadding,
  [vars.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
  [vars.errorMessageIconPosition]: refs.errorMessageIconPosition,
  [vars.errorMessageFontSize]: refs.errorMessageFontSize,
};

export default password;
export { vars };
