'use strict';

const bundleMjs = require('./bundle-mjs-d58a83c6.cjs');
const tailwindConfig = require('./tailwind-config.cjs');

var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('cn-5ceac001.cjs', document.baseURI).href)).replace(/^file:\/\/|\/\w+\.?[jt]s$/g, "").replace(/\/index\.[a-z]+$/g, "");

(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('cn-5ceac001.cjs', document.baseURI).href)).replace(/^file:\/\/|\/\w+\.?[jt]s$/g, "").replace(/\/index\.[a-z]+$/g, "");

(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('cn-5ceac001.cjs', document.baseURI).href)).replace(/^file:\/\/|\/\w+\.?[jt]s$/g, "").replace(/\/index\.[a-z]+$/g, "");

function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}

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

exports.cn = cn;
