'use strict';

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });

const tailwindMerge = require('tailwind-merge');
const clsx = require('clsx');
const tailwindConfig = require('../../tailwind-config.cjs');

const customTwMerge = tailwindMerge.extendTailwindMerge({
  extend: {
    theme: {
      color: Object.entries(tailwindConfig.colorPalette).reduce((acc, currentVal) => {
        const colors = Object.keys(currentVal[1]).map(
          (c) => `${currentVal[0]}-${c}`
        );
        return acc.concat(colors);
      }, [])
    },
    classGroups: {
      shadow: [{ shadow: Object.keys(tailwindConfig.boxShadows).map((s) => `${s}`) }],
      "font-size": [{ text: Object.keys(tailwindConfig.fontSizes) }],
      "font-weight": [{ font: Object.keys(tailwindConfig.fontWeights) }],
      rounded: [{ rounded: Object.keys(tailwindConfig.borderRadius) }],
      scale: [{ scale: Object.keys(tailwindConfig.scales) }],
      h: [{ h: Object.keys(tailwindConfig.heights) }],
      leading: [{ leading: Object.keys(tailwindConfig.lineHeights) }]
    }
  }
});
const cn = (...inputs) => {
  return customTwMerge(clsx.clsx(inputs));
};

exports.cn = cn;
