import { clsx } from 'clsx';

import { SizeLarge, SizeMedium, SizeSmall } from '../common';

export type InputPropsBase = {
  size?: 'auto' | SizeSmall | SizeMedium | SizeLarge;
};

export function inputClassNameBase({ size = 'auto' }: InputPropsBase = {}) {
  return clsx(
    'form-control', // TODO: Deprecate
    'np-form-control',
    {
      'np-form-control--size-auto': size === 'auto',
      'np-form-control--size-sm': size === 'sm',
      'np-form-control--size-md': size === 'md',
      'np-form-control--size-lg': size === 'lg',
    },
  );
}
