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

export default function (props, style) {
  const {
    highLight,
    active,
    size,
    disabled,
    color,
    rhs
  } = props;
  const listClass = compileClassNames({
    [style.base]: true,
    [style[size]]: size,
    [style[color]]: color,
    [style.highLight]: !!highLight,
    [style.active]: !!active,
    [style.rightAlignment]: !!rhs,
    [style.disabled]: !!disabled
  });
  const LHSAlignment = compileClassNames({
    [style.lhs]: true
  });
  const RHSAlignment = compileClassNames({
    [style.rhs]: true
  });
  const subTitleClass = compileClassNames({
    [style.subTitle]: true
  });
  const contentClass = compileClassNames({
    [style.content]: true
  });
  return {
    listClass,
    LHSAlignment,
    RHSAlignment,
    subTitleClass,
    contentClass
  };
}