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

export default function (props, style) {
  let {
    title,
    zIndex
  } = props;
  var tooltipClassName = compileClassNames({
    [style.tooltipContainer]: true,
    [style.show]: title != null,
    [style[zIndex]]: zIndex
  });
  var tooltipMessageClassName = compileClassNames({
    [style.tooltipMessage]: true
  });
  return {
    tooltipClassName,
    tooltipMessageClassName
  };
}