import { TextAreaClass } from '../../components/descope-text-area/TextAreaClass';
import { refs } from './inputWrapper';

const vars = TextAreaClass.cssVarList;

const textArea = {
  [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.labelRequiredIndicator]: refs.requiredIndicator,
  [vars.errorMessageTextColor]: refs.errorMessageTextColor,
  [vars.inputBackgroundColor]: refs.backgroundColor,
  [vars.inputValueTextColor]: refs.valueTextColor,
  [vars.inputPlaceholderTextColor]: refs.placeholderTextColor,
  [vars.inputBorderRadius]: refs.borderRadius,
  [vars.inputBorderWidth]: refs.borderWidth,
  [vars.inputBorderStyle]: refs.borderStyle,
  [vars.inputBorderColor]: refs.borderColor,
  [vars.inputOutlineWidth]: refs.outlineWidth,
  [vars.inputOutlineStyle]: refs.outlineStyle,
  [vars.inputOutlineColor]: refs.outlineColor,
  [vars.inputOutlineOffset]: refs.outlineOffset,
  [vars.inputResizeType]: 'vertical',
  [vars.inputMinHeight]: '5em',

  // 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,

  textAlign: {
    right: { [vars.inputTextAlign]: 'right' },
    left: { [vars.inputTextAlign]: 'left' },
    center: { [vars.inputTextAlign]: 'center' },
  },

  _readonly: {
    [vars.inputResizeType]: 'none',
  },
};

export default textArea;
export { vars };
