'use strict';

var _tslib = require('../_virtual/_tslib.js');
var index = require('../external/classnames/index.js');
var createTailwindMerge = require('../external/tailwind-merge/dist/lib/create-tailwind-merge.js');
var defaultConfig = require('../external/tailwind-merge/dist/lib/default-config.js');

// HACK: keep this in sync with the default fonts
var SUBFRAME_FONT_MIXINS = [
    // old font mixins
    "text-label",
    "text-label-bold",
    "text-body",
    "text-body-bold",
    "text-subheader",
    "text-section-header",
    "text-header",
    "text-monospace-body",
    // new font mixins
    "text-caption",
    "text-caption-bold",
    "text-heading-3",
    "text-heading-2",
    "text-heading-1",
];
var customTWMerge = createTailwindMerge.createTailwindMerge(function () {
    var defaultConfig$1 = defaultConfig.getDefaultConfig();
    return _tslib.__assign(_tslib.__assign({}, defaultConfig$1), { classGroups: _tslib.__assign(_tslib.__assign({}, defaultConfig$1.classGroups), { 
            // "subframe-colors": [{ text: [isTextColor] }],
            "subframe-font-mixins": SUBFRAME_FONT_MIXINS }), conflictingClassGroups: {
            // font colors
            // "text-color": ["subframe-colors"],
            // font mixins
            "subframe-font-mixins": ["font-size", "leading", "font-weight"],
            "font-size": ["subframe-font-mixins"],
            leading: ["subframe-font-mixins"],
            "font-weight": ["subframe-font-mixins"],
        } });
});
function twClassNames() {
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
    }
    return customTWMerge(index.apply(void 0, args));
}
/**
 * Very janky "unit tests"
 */
// //  color related
// console.log(
//   "Testing that font colors are overridden",
//   twClassNames("text-gray-300", "text-brand-300") === "text-brand-300",
// )
// console.log(
//   "Testing that font colors are overridden",
//   twClassNames("text-brand-300", "text-gray-300") === "text-gray-300",
// )
// console.log(
//   "Testing that hard-coded font colors are overridden",
//   twClassNames("text-gray-300", "text-neutral-border") === "text-neutral-border",
// )
// console.log(
//   "Testing that hard-coded font colors are overridden",
//   twClassNames("text-neutral-border", "text-gray-300") === "text-gray-300",
// )
// console.log(
//   "Testing that background colors are overridden",
//   twClassNames("bg-gray-300", "bg-brand-300") === "bg-brand-300",
// )
// console.log(
//   "Testing that background colors are overridden",
//   twClassNames("bg-brand-300", "bg-gray-300") === "bg-gray-300",
// )
// // spacing
// console.log("Testing that custom spacing is overridden", twClassNames("pt-4", "pt-192") === "pt-192")
// // font mixins
// console.log(
//   "Testing that font sizes are overridden",
//   twClassNames("text-label", "text-[24px] font-[500] leading-[38px]") === "text-[24px] font-[500] leading-[38px]",
// )
// console.log(
//   "Testing that font sizes are overridden",
//   twClassNames("text-[24px] font-medium leading-[38px]", "text-label") === "text-label",
// )
// console.log(
//   "Testing that font sizes are overridden",
//   twClassNames("text-[24px] font-[500] leading-[38px]", "text-[14px] font-[400] leading-[16px]") ===
//     "text-[14px] font-[400] leading-[16px]",
// )
// // interactions between font mixins and colors
// console.log(
//   "Testing that text-label does not override any colors and vice-versa",
//   twClassNames("text-label", "text-brand-300") === "text-label text-brand-300",
// )
// console.log(
//   "Testing that text-label does not override any colors and vice-versa",
//   twClassNames("text-brand-300", "text-label") === "text-brand-300 text-label",
// )

exports.SUBFRAME_FONT_MIXINS = SUBFRAME_FONT_MIXINS;
exports.twClassNames = twClassNames;
//# sourceMappingURL=tw-classnames.js.map
