import { kebabCase } from './common';
import { uniq as _uniq, map as _map } from 'lodash-es';

export function toCssText(style, className = '.some-class-name') {
  const attrText = Object.keys(style)
    .map((key) => {
      const value = style[key];
      return `${kebabCase(key)}: ${value};`;
    })
    .join('\n');
  return `${className} { ${attrText} }\n`;
}
