import { compileClassNames } from '@zohodesk/utils';
/**
 * container classname based on js state
 * @param {object} props textbox props
 * @param {object} style textbox syle
 * @returns {string} classnames string with space separate
 */

export default ((props, style) => {
  const {
    variant,
    color,
    size,
    shape,
    active,
    hovered,
    disabled,
    readonly
  } = props;
  return compileClassNames({
    [style.base]: true,
    [style[variant]]: !!variant,
    [style[color]]: !!color,
    [style[size]]: !!size,
    [style[shape]]: !!shape,
    // [style.content]: !!(startIcon || endIcon || children),
    [style.active]: !!active,
    [style.hovered]: !!hovered,
    [style.disabled]: !!disabled,
    [style.readonly]: !!readonly
  });
});