'use strict';

var chunkOAFHKDSM_cjs = require('./chunk-OAFHKDSM.cjs');
var XMarkIcon = require('@heroicons/react/20/solid/XMarkIcon');
var tailwindMerge = require('tailwind-merge');
var lodashEs = require('lodash-es');
var react = require('@tw-classed/react');
var core = require('@tw-classed/core');
var clsx4 = require('clsx');
var createVariatGroupTransfomer = require('tailwind-group-variant');
var React = require('react');
var jsxRuntime = require('react/jsx-runtime');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var XMarkIcon__default = /*#__PURE__*/_interopDefault(XMarkIcon);
var clsx4__default = /*#__PURE__*/_interopDefault(clsx4);
var createVariatGroupTransfomer__default = /*#__PURE__*/_interopDefault(createVariatGroupTransfomer);
var React__default = /*#__PURE__*/_interopDefault(React);

var twMerge = tailwindMerge.extendTailwindMerge({
  classGroups: {
    "font-size": [
      {
        // Fixes incorect merging of text size
        text: ["h1", "h2", "h3", "h4", "h5", "h6"]
      }
    ]
  }
});
var { classed } = react.createClassed({ merger: twMerge });
core.createClassed({ merger: twMerge });
var classedVariantMap = (variantMap) => variantMap;
function generateCompoundVariants(compoundVariantPropMap) {
  const { commonVariantProps, compoundVariantMapLists } = lodashEs.transform(
    compoundVariantPropMap,
    (result, value, key) => {
      if (typeof value === "boolean" || typeof value === "string") {
        result.commonVariantProps[key] = value;
        return result;
      }
      const compoundVariantMapList = lodashEs.map(value, (className, variantMapKey) => ({
        [key]: variantMapKey,
        class: className
      }));
      result.compoundVariantMapLists.push(compoundVariantMapList);
      return result;
    },
    {
      commonVariantProps: {},
      compoundVariantMapLists: []
    }
  );
  return compoundVariantMapLists.flat().map(({ class: cls, ...props }) => {
    return {
      ...commonVariantProps,
      class: twMerge(cls, compoundVariantPropMap.className),
      ...props
    };
  });
}

// src/utils/notEmpty.ts
function notEmpty(value) {
  return value !== null && value !== void 0;
}

// src/utils/classed/expandVariant.ts
createVariatGroupTransfomer__default.default({});
function mergeVariants(variants, overrides) {
  const variantArray = Array.isArray(variants) ? variants : Object.values(variants);
  const mergerFn = (objectValue, sourceValue) => tailwindMerge.twMerge(`${objectValue || ""}`, `${sourceValue}`);
  const mergedVariants = lodashEs.mergeWith({}, ...[...variantArray, overrides], mergerFn);
  return mergedVariants;
}
var colorVariants = {
  textBgContrast: {
    primary: clsx4__default.default("text-content-inverse-intense"),
    neutral: clsx4__default.default("text-content-inverse-intense"),
    inverse: clsx4__default.default("text-content-inverse-intense dark:text-surface-inverse-50"),
    success: clsx4__default.default("text-content-inverse-intense"),
    danger: clsx4__default.default("text-content-inverse-intense"),
    caution: clsx4__default.default("text-content-inverse-intense"),
    surface: clsx4__default.default("text-content-moderate dark:text-content-inverse-intense"),
    "various-blue": clsx4__default.default("text-content-inverse-intense"),
    "various-emerald": clsx4__default.default("text-content-inverse-intense"),
    "various-orange": clsx4__default.default("text-content-inverse-intense"),
    "various-fuchsia": clsx4__default.default("text-content-inverse-intense"),
    "various-yellow": clsx4__default.default("text-content-inverse-intense"),
    "various-rose": clsx4__default.default("text-content-inverse-intense"),
    "various-cyan": clsx4__default.default("text-content-inverse-intense"),
    "various-violet": clsx4__default.default("text-content-inverse-intense"),
    "various-teal": clsx4__default.default("text-content-inverse-intense"),
    "various-pink": clsx4__default.default("text-content-inverse-intense"),
    "various-lime": clsx4__default.default("text-content-inverse-intense"),
    "various-gray": clsx4__default.default("text-content-inverse-intense")
  },
  bg: {
    primary: clsx4__default.default("bg-primary"),
    neutral: clsx4__default.default("bg-neutral-600"),
    success: clsx4__default.default("bg-success"),
    danger: clsx4__default.default("bg-danger"),
    caution: clsx4__default.default("bg-caution"),
    inverse: clsx4__default.default("bg-neutral-900", "dark:bg-content-inverse-intense"),
    surface: clsx4__default.default("bg-surface dark:bg-surface-inverse-100"),
    "surface-soft": clsx4__default.default("bg-surface-soft", "dark:bg-surface-inverse-soft"),
    "surface-light": clsx4__default.default("bg-surface-light", "dark:bg-surface-inverse-light"),
    "surface-dark": clsx4__default.default("bg-surface-dark", "dark:bg-surface-inverse-dark"),
    "various-blue": clsx4__default.default("bg-palette-various-blue"),
    "various-emerald": clsx4__default.default("bg-palette-various-emerald"),
    "various-orange": clsx4__default.default("bg-palette-various-orange"),
    "various-fuchsia": clsx4__default.default("bg-palette-various-fuchsia"),
    "various-yellow": clsx4__default.default("bg-palette-various-yellow"),
    "various-rose": clsx4__default.default("bg-palette-various-rose"),
    "various-cyan": clsx4__default.default("bg-palette-various-cyan"),
    "various-violet": clsx4__default.default("bg-palette-various-violet"),
    "various-teal": clsx4__default.default("bg-palette-various-teal"),
    "various-pink": clsx4__default.default("bg-palette-various-pink"),
    "various-lime": clsx4__default.default("bg-palette-various-lime"),
    "various-gray": clsx4__default.default("bg-palette-various-gray")
  },
  bgHighlight: {
    primary: clsx4__default.default("bg-primary-light/10"),
    neutral: clsx4__default.default("bg-neutral-400/10"),
    success: clsx4__default.default("bg-success-light/10"),
    danger: clsx4__default.default("bg-danger-light/10"),
    caution: clsx4__default.default("bg-caution-light/10"),
    "various-blue": clsx4__default.default("bg-palette-various-blue-light/10"),
    "various-emerald": clsx4__default.default("bg-palette-various-emerald-light/10"),
    "various-orange": clsx4__default.default("bg-palette-various-orange-light/10"),
    "various-fuchsia": clsx4__default.default("bg-palette-various-fuchsia-light/10"),
    "various-yellow": clsx4__default.default("bg-palette-various-yellow-light/10"),
    "various-rose": clsx4__default.default("bg-palette-various-rose-light/10"),
    "various-cyan": clsx4__default.default("bg-palette-various-cyan-light/10"),
    "various-violet": clsx4__default.default("bg-palette-various-violet-light/10"),
    "various-teal": clsx4__default.default("bg-palette-various-teal-light/10"),
    "various-pink": clsx4__default.default("bg-palette-various-pink-light/10"),
    "various-lime": clsx4__default.default("bg-palette-various-lime-light/10"),
    "various-gray": clsx4__default.default("bg-palette-various-gray-light/10"),
    inverse: clsx4__default.default("bg-surface-inverse/10", "dark:bg-surface/10"),
    surface: clsx4__default.default("bg-surface/10", "dark:bg-surface-inverse-50/30")
  },
  bgHoverHighlightDark: {
    primary: clsx4__default.default("hover:bg-primary-light/20"),
    neutral: clsx4__default.default("hover:bg-neutral-400/20"),
    success: clsx4__default.default("hover:bg-success-light/20"),
    danger: clsx4__default.default("hover:bg-danger-light/20"),
    caution: clsx4__default.default("hover:bg-caution-light/20"),
    "various-blue": clsx4__default.default("hover:bg-palette-various-blue-light/20"),
    "various-emerald": clsx4__default.default("hover:bg-palette-various-emerald-light/20"),
    "various-orange": clsx4__default.default("hover:bg-palette-various-orange-light/20"),
    "various-fuchsia": clsx4__default.default("hover:bg-palette-various-fuchsia-light/20"),
    "various-yellow": clsx4__default.default("hover:bg-palette-various-yellow-light/20"),
    "various-rose": clsx4__default.default("hover:bg-palette-various-rose-light/20"),
    "various-cyan": clsx4__default.default("hover:bg-palette-various-cyan-light/20"),
    "various-violet": clsx4__default.default("hover:bg-palette-various-violet-light/20"),
    "various-teal": clsx4__default.default("hover:bg-palette-various-teal-light/20"),
    "various-pink": clsx4__default.default("hover:bg-palette-various-pink-light/20"),
    "various-lime": clsx4__default.default("hover:bg-palette-various-lime-light/20"),
    "various-gray": clsx4__default.default("hover:bg-palette-various-gray-light/20"),
    inverse: clsx4__default.default("hover:bg-surface-inverse/20", "dark:hover:bg-surface/20"),
    surface: clsx4__default.default("hover:bg-surface/20", "dark:hover:bg-surface-inverse-soft/20")
  },
  hoverDark: {
    primary: clsx4__default.default("hover:bg-primary-dark"),
    neutral: clsx4__default.default("hover:bg-neutral-600"),
    success: clsx4__default.default("hover:bg-success-dark"),
    danger: clsx4__default.default("hover:bg-danger-dark"),
    caution: clsx4__default.default("hover:bg-caution-dark"),
    inverse: clsx4__default.default("hover:bg-surface-inverse-dark dark:hover:bg-surface-dark"),
    surface: clsx4__default.default("hover:bg-surface-100 hover:dark:bg-surface-inverse-400"),
    "surface-soft": clsx4__default.default("hover:bg-surface-light", "hover:dark:bg-surface-inverse-light"),
    "surface-light": clsx4__default.default("hover:bg-surface-dark", "hover:dark:bg-surface-inverse-dark"),
    "surface-dark": clsx4__default.default("hover:bg-surface-900", "hover:dark:bg-surface-inverse-900"),
    "various-blue": clsx4__default.default("hover:bg-palette-various-blue-dark"),
    "various-emerald": clsx4__default.default("hover:bg-palette-various-emerald-dark"),
    "various-orange": clsx4__default.default("hover:bg-palette-various-orange-dark"),
    "various-fuchsia": clsx4__default.default("hover:bg-palette-various-fuchsia-dark"),
    "various-yellow": clsx4__default.default("hover:bg-palette-various-yellow-dark"),
    "various-rose": clsx4__default.default("hover:bg-palette-various-rose-dark"),
    "various-cyan": clsx4__default.default("hover:bg-palette-various-cyan-dark"),
    "various-violet": clsx4__default.default("hover:bg-palette-various-violet-dark"),
    "various-teal": clsx4__default.default("hover:bg-palette-various-teal-dark"),
    "various-pink": clsx4__default.default("hover:bg-palette-various-pink-dark"),
    "various-lime": clsx4__default.default("hover:bg-palette-various-lime-dark"),
    "various-gray": clsx4__default.default("hover:bg-palette-various-gray-dark")
  },
  border: {
    primary: clsx4__default.default("border-primary"),
    neutral: clsx4__default.default("border-neutral"),
    success: clsx4__default.default("border-success"),
    danger: clsx4__default.default("border-danger"),
    caution: clsx4__default.default("border-caution"),
    surface: clsx4__default.default("border-black/20 dark:border-white/20"),
    inverse: clsx4__default.default("border-black/10 dark:border-white/60"),
    "various-blue": clsx4__default.default("border-palette-various-blue"),
    "various-emerald": clsx4__default.default("border-palette-various-emerald"),
    "various-orange": clsx4__default.default("border-palette-various-orange"),
    "various-fuchsia": clsx4__default.default("border-palette-various-fuchsia"),
    "various-yellow": clsx4__default.default("border-palette-various-yellow"),
    "various-rose": clsx4__default.default("border-palette-various-rose"),
    "various-cyan": clsx4__default.default("border-palette-various-cyan"),
    "various-violet": clsx4__default.default("border-palette-various-violet"),
    "various-teal": clsx4__default.default("border-palette-various-teal"),
    "various-pink": clsx4__default.default("border-palette-various-pink"),
    "various-lime": clsx4__default.default("border-palette-various-lime"),
    "various-gray": clsx4__default.default("border-palette-various-gray")
  },
  focusBorder: {
    neutral: clsx4__default.default("focus:border-neutral-light"),
    primary: clsx4__default.default("focus:border-primary-light"),
    success: clsx4__default.default("focus:border-success-light"),
    danger: clsx4__default.default("focus:border-danger-light"),
    caution: clsx4__default.default("focus:border-caution-light"),
    inverse: clsx4__default.default("focus:border-surface-inverse dark:focus:border-surface"),
    surface: clsx4__default.default(""),
    "various-blue": clsx4__default.default("focus:border-palette-various-blue"),
    "various-emerald": clsx4__default.default("focus:border-palette-various-emerald"),
    "various-orange": clsx4__default.default("focus:border-palette-various-orange"),
    "various-fuchsia": clsx4__default.default("focus:border-palette-various-fuchsia"),
    "various-yellow": clsx4__default.default("focus:border-palette-various-yellow"),
    "various-rose": clsx4__default.default("focus:border-palette-various-rose"),
    "various-cyan": clsx4__default.default("focus:border-palette-various-cyan"),
    "various-violet": clsx4__default.default("focus:border-palette-various-violet"),
    "various-teal": clsx4__default.default("focus:border-palette-various-teal"),
    "various-pink": clsx4__default.default("focus:border-palette-various-pink"),
    "various-lime": clsx4__default.default("focus:border-palette-various-lime"),
    "various-gray": clsx4__default.default("focus:border-palette-various-gray")
  },
  focusRing: {
    neutral: clsx4__default.default("focus:ring-neutral"),
    primary: clsx4__default.default("focus:ring-primary"),
    success: clsx4__default.default("focus:ring-success"),
    danger: clsx4__default.default("focus:ring-danger"),
    caution: clsx4__default.default("focus:ring-caution"),
    surface: clsx4__default.default("focus:ring-black/10 dark:focus:ring-white/10"),
    inverse: clsx4__default.default("focus:ring-surface-inverse dark:focus:ring-surface"),
    "various-blue": clsx4__default.default("focus:ring-palette-various-blue"),
    "various-emerald": clsx4__default.default("focus:ring-palette-various-emerald"),
    "various-orange": clsx4__default.default("focus:ring-palette-various-orange"),
    "various-fuchsia": clsx4__default.default("focus:ring-palette-various-fuchsia"),
    "various-yellow": clsx4__default.default("focus:ring-palette-various-yellow"),
    "various-rose": clsx4__default.default("focus:ring-palette-various-rose"),
    "various-cyan": clsx4__default.default("focus:ring-palette-various-cyan"),
    "various-violet": clsx4__default.default("focus:ring-palette-various-violet"),
    "various-teal": clsx4__default.default("focus:ring-palette-various-teal"),
    "various-pink": clsx4__default.default("focus:ring-palette-various-pink"),
    "various-lime": clsx4__default.default("focus:ring-palette-various-lime"),
    "various-gray": clsx4__default.default("focus:ring-palette-various-gray")
  },
  ring: {
    neutral: clsx4__default.default("ring-neutral-300 dark:ring-neutral-400"),
    primary: clsx4__default.default("ring-primary"),
    success: clsx4__default.default("ring-success"),
    danger: clsx4__default.default("ring-danger"),
    caution: clsx4__default.default("ring-caution"),
    surface: clsx4__default.default("dark:ring-surface-inverse-200 ring-black/10"),
    inverse: clsx4__default.default("ring-surface-inverse dark:ring-surface"),
    "various-blue": clsx4__default.default("ring-palette-various-blue"),
    "various-emerald": clsx4__default.default("ring-palette-various-emerald"),
    "various-orange": clsx4__default.default("ring-palette-various-orange"),
    "various-fuchsia": clsx4__default.default("ring-palette-various-fuchsia"),
    "various-yellow": clsx4__default.default("ring-palette-various-yellow"),
    "various-rose": clsx4__default.default("ring-palette-various-rose"),
    "various-cyan": clsx4__default.default("ring-palette-various-cyan"),
    "various-violet": clsx4__default.default("ring-palette-various-violet"),
    "various-teal": clsx4__default.default("ring-palette-various-teal"),
    "various-pink": clsx4__default.default("ring-palette-various-pink"),
    "various-lime": clsx4__default.default("ring-palette-various-lime"),
    "various-gray": clsx4__default.default("ring-palette-various-gray")
  },
  fill: {
    primary: clsx4__default.default("fill-primary"),
    neutral: clsx4__default.default("fill-neutral"),
    "neutral-light": clsx4__default.default("fill-neutral-light"),
    success: clsx4__default.default("fill-success"),
    danger: clsx4__default.default("fill-danger"),
    caution: clsx4__default.default("fill-caution"),
    inverse: clsx4__default.default("fill-surface-inverse", "dark:fill-surface"),
    surface: clsx4__default.default("fill-surface", "dark:fill-surface-inverse-soft"),
    "surface-soft": clsx4__default.default("fill-surface-soft", "dark:fill-surface-inverse-soft"),
    "surface-light": clsx4__default.default("fill-surface-light", "dark:fill-surface-inverse-light"),
    "surface-dark": clsx4__default.default("fill-surface-dark", "dark:fill-surface-inverse-dark"),
    "various-blue": clsx4__default.default("fill-palette-various-blue"),
    "various-emerald": clsx4__default.default("fill-palette-various-emerald"),
    "various-orange": clsx4__default.default("fill-palette-various-orange"),
    "various-fuchsia": clsx4__default.default("fill-palette-various-fuchsia"),
    "various-yellow": clsx4__default.default("fill-palette-various-yellow"),
    "various-rose": clsx4__default.default("fill-palette-various-rose"),
    "various-cyan": clsx4__default.default("fill-palette-various-cyan"),
    "various-violet": clsx4__default.default("fill-palette-various-violet"),
    "various-teal": clsx4__default.default("fill-palette-various-teal"),
    "various-pink": clsx4__default.default("fill-palette-various-pink"),
    "various-lime": clsx4__default.default("fill-palette-various-lime"),
    "various-gray": clsx4__default.default("fill-palette-various-gray"),
    transparent: clsx4__default.default("fill-transparent")
  },
  shadow: {
    primary: clsx4__default.default("shadow-primary/50", "dark:shadow-primary-800/60"),
    neutral: clsx4__default.default("shadow-neutral-500/50", "dark:shadow-neutral-800/80"),
    success: clsx4__default.default("shadow-success/50", "dark:shadow-success-800/60"),
    danger: clsx4__default.default("shadow-danger/50", "dark:shadow-danger-800/60"),
    caution: clsx4__default.default("shadow-caution/50", "dark:shadow-caution-800/60"),
    inverse: clsx4__default.default("shadow-surface-inverse/50", "dark:shadow-surface-inverse-50/80"),
    surface: clsx4__default.default("shadow-surface-800", "dark:shadow-neutral-800/80"),
    "surface-soft": clsx4__default.default("shadow-surface-soft/50", "dark:shadow-surface-soft/60"),
    "surface-light": clsx4__default.default("shadow-surface-light/50", "dark:shadow-surface-light/60"),
    "surface-dark": clsx4__default.default("shadow-surface-dark/50", "dark:shadow-surface-dark/60"),
    "various-blue": clsx4__default.default(
      "shadow-palette-various-blue/50",
      "dark:shadow-palette-various-blue-800/60"
    ),
    "various-emerald": clsx4__default.default(
      "shadow-palette-various-emerald/50",
      "dark:shadow-palette-various-emerald-800/60"
    ),
    "various-orange": clsx4__default.default(
      "shadow-palette-various-orange/50",
      "dark:shadow-palette-various-orange-800/60"
    ),
    "various-fuchsia": clsx4__default.default(
      "shadow-palette-various-fuchsia/50",
      "dark:shadow-palette-various-fuchsia-800/60"
    ),
    "various-yellow": clsx4__default.default(
      "shadow-palette-various-yellow/50",
      "dark:shadow-palette-various-yellow-800/60"
    ),
    "various-rose": clsx4__default.default(
      "shadow-palette-various-rose/50",
      "dark:shadow-palette-various-rose-800/60"
    ),
    "various-cyan": clsx4__default.default(
      "shadow-palette-various-cyan/50",
      "dark:shadow-palette-various-cyan-800/60"
    ),
    "various-violet": clsx4__default.default(
      "shadow-palette-various-violet/50",
      "dark:shadow-palette-various-violet-800/60"
    ),
    "various-teal": clsx4__default.default(
      "shadow-palette-various-teal/50",
      "dark:shadow-palette-various-teal-800/60"
    ),
    "various-pink": clsx4__default.default(
      "shadow-palette-various-pink/50",
      "dark:shadow-palette-various-pink-800/60"
    ),
    "various-lime": clsx4__default.default(
      "shadow-palette-various-lime/50",
      "dark:shadow-palette-various-lime-800/60"
    ),
    "various-gray": clsx4__default.default(
      "shadow-palette-various-gray/50",
      "dark:shadow-palette-various-gray-800/60"
    )
  },
  gradient: {
    primary: clsx4__default.default("from-primary-300 via-primary-500  to-primary-700"),
    neutral: clsx4__default.default(
      "from-neutral-300 via-neutral-400  to-neutral-700",
      "dark:to-surface-inverse dark:from-neutral-300  dark:via-neutral-600"
    ),
    success: clsx4__default.default("from-success-300 via-success-500  to-success-700"),
    danger: clsx4__default.default("from-danger-300 via-danger-500  to-danger-600"),
    caution: clsx4__default.default("from-caution-300 via-caution-500  to-caution-600"),
    "various-blue": clsx4__default.default(
      "from-palette-various-blue-300 via-palette-various-blue-500  to-palette-various-blue-600"
    ),
    "various-emerald": clsx4__default.default(
      "from-palette-various-emerald-300 via-palette-various-emerald-500  to-palette-various-emerald-600"
    ),
    "various-orange": clsx4__default.default(
      "from-palette-various-orange-300 via-palette-various-orange-500  to-palette-various-orange-600"
    ),
    "various-fuchsia": clsx4__default.default(
      "from-palette-various-fuchsia-300 via-palette-various-fuchsia-500  to-palette-various-fuchsia-600"
    ),
    "various-yellow": clsx4__default.default(
      "from-palette-various-yellow-300 via-palette-various-yellow-500  to-palette-various-yellow-600"
    ),
    "various-rose": clsx4__default.default(
      "from-palette-various-rose-300 via-palette-various-rose-500  to-palette-various-rose-600"
    ),
    "various-cyan": clsx4__default.default(
      "from-palette-various-cyan-300 via-palette-various-cyan-500  to-palette-various-cyan-600"
    ),
    "various-violet": clsx4__default.default(
      "from-palette-various-violet-300 via-palette-various-violet-500  to-palette-various-violet-600"
    ),
    "various-teal": clsx4__default.default(
      "from-palette-various-teal-300 via-palette-various-teal-500  to-palette-various-teal-600"
    ),
    "various-pink": clsx4__default.default(
      "from-palette-various-pink-300 via-palette-various-pink-500  to-palette-various-pink-600"
    ),
    "various-lime": clsx4__default.default(
      "from-palette-various-lime-300 via-palette-various-lime-500  to-palette-various-lime-600"
    ),
    "various-gray": clsx4__default.default(
      "from-palette-various-gray-300 via-palette-various-gray-500  to-palette-various-gray-600"
    ),
    inverse: clsx4__default.default(
      "to-surface-inverse from-neutral-300",
      "dark:from-surface-50  dark:to-neutral-400 "
    ),
    surface: clsx4__default.default(
      "from-surface-50  via-surface-200 to-surface-900",
      "dark:via-surface-inverse-300 dark:to-surface-inverse-900 dark:from-neutral-500"
    ),
    "surface-soft": clsx4__default.default(
      "from-surface-soft",
      "dark:from-surface-inverse-soft dark:to-surface-inverse-soft"
    ),
    "surface-light": clsx4__default.default(
      "from-surface-light",
      "dark:from-surface-inverse-light dark:to-surface-inverse-light"
    ),
    "surface-dark": clsx4__default.default(
      "from-surface-dark",
      "dark:from-surface-inverse-dark dark:to-surface-inverse-dark"
    )
  }
};
var colorToTWTokenMap = {
  primary: "primary",
  danger: "danger",
  success: "success",
  caution: "caution",
  inverse: "inverse",
  surface: "surface",
  neutral: "neutral",
  blue: "various-blue",
  green: "various-emerald",
  red: "various-red",
  yellow: "various-yellow",
  orange: "various-orange",
  fuchsia: "various-fuchsia",
  rose: "various-rose",
  cyan: "various-cyan",
  violet: "various-violet",
  teal: "various-teal",
  pink: "various-pink",
  lime: "various-lime",
  gray: "various-gray"
};
({
  primary: "filled-accent-primary",
  secondary: "filled-accent-secondary",
  inverse: "filled-accent-inverse",
  heart: "filled-accent-heart",
  info: "filled-accent-info",
  success: "filled-accent-success",
  danger: "filled-accent-danger",
  caution: "filled-accent-caution",
  surface: "filled-accent-surface",
  blue: clsx4__default.default("filled-accent-palette-various-blue"),
  neutral: clsx4__default.default("filled-accent-palette-various-neutral"),
  green: clsx4__default.default("filled-accent-palette-various-green"),
  red: clsx4__default.default("filled-accent-palette-various-red"),
  yellow: clsx4__default.default("filled-accent-palette-various-yellow"),
  orange: clsx4__default.default("filled-accent-palette-various-orange"),
  fuchsia: clsx4__default.default("filled-accent-palette-various-fuchsia"),
  rose: clsx4__default.default("filled-accent-palette-various-rose"),
  cyan: clsx4__default.default("filled-accent-palette-various-cyan"),
  violet: clsx4__default.default("filled-accent-palette-various-violet"),
  teal: clsx4__default.default("filled-accent-palette-various-teal"),
  pink: clsx4__default.default("filled-accent-palette-various-pink"),
  lime: clsx4__default.default("filled-accent-palette-various-lime"),
  gray: clsx4__default.default("filled-accent-palette-various-gray")
});

// src/utils/hash.ts
function stringToArrayElement(str, arr, fallback) {
  if (!str)
    return fallback;
  const hash = hashCode(str);
  const index = Math.abs(hash % arr.length);
  return arr[index];
}
function hashCode(s) {
  const A = 54059;
  const B = 76963;
  const C = 86969;
  const hash = 37;
  let h = hash;
  for (let i = 0; i < s.length; i++) {
    h = h * A ^ s.charCodeAt(i) * B;
  }
  h = h * C % 4294967296;
  return h;
}

// src/utils/stringToDistinctColorClass.ts
var distinctColors = {
  bg: {
    fallback: "bg-neutral-500",
    colors: [
      "bg-palette-various-blue",
      "bg-palette-various-emerald",
      "bg-palette-various-orange",
      "bg-palette-various-fuchsia",
      "bg-palette-various-yellow",
      "bg-palette-various-rose",
      "bg-palette-various-cyan",
      "bg-palette-various-violet",
      "bg-palette-various-teal",
      "bg-palette-various-pink",
      "bg-palette-various-lime",
      "bg-palette-various-gray"
    ]
  },
  text: {
    fallback: "text-neutral-500",
    colors: [
      "text-palette-various-blue",
      "text-palette-various-emerald",
      "text-palette-various-orange",
      "text-palette-various-fuchsia",
      "text-palette-various-yellow",
      "text-palette-various-rose",
      "text-palette-various-cyan",
      "text-palette-various-violet",
      "text-palette-various-teal",
      "text-palette-various-pink",
      "text-palette-various-lime",
      "text-palette-various-gray"
    ]
  }
};
function stringToDistinctColorClass(str, classTokensMap, options) {
  const { forceDefaultClass } = options ?? {};
  const classTokenKeys = Object.entries(classTokensMap).map(([key, value]) => {
    return value ? key : void 0;
  }).filter(notEmpty);
  const classArr = classTokenKeys.map((key) => {
    const { colors, fallback: defaultFallback } = distinctColors[key];
    const defaultClassTokenValue = classTokensMap[key];
    const defaultClassToken = typeof defaultClassTokenValue === "string" ? defaultClassTokenValue : void 0;
    const fallback = defaultClassToken ?? defaultFallback;
    if (forceDefaultClass) {
      return fallback;
    }
    const element = stringToArrayElement(str, colors, fallback);
    return element;
  });
  return classArr.join(" ");
}
async function fetchStatusColor(label, picked) {
  if (!label)
    return void 0;
  const response = await import('./statusToColorMap-ZDYX4EUQ.cjs');
  const { default: statusColorMap } = response;
  function getColorName() {
    const word = label?.toLowerCase() ?? "";
    if (word in statusColorMap) {
      return lodashEs.get(statusColorMap, word);
    }
    const wordParts = word.split(" ");
    const wordMatch = wordParts.find((word2) => word2 in chunkOAFHKDSM_cjs.statusToColorMap_default);
    return wordMatch ? lodashEs.get(statusColorMap, wordMatch) : void 0;
  }
  const colorName = getColorName();
  if (!colorName)
    return void 0;
  const colorToken = lodashEs.get(colorToTWTokenMap, colorName);
  if (!colorToken)
    return void 0;
  const colors = mergeVariants(lodashEs.pick(colorVariants, Object.keys(picked)));
  const colorClass = lodashEs.get(colors, colorToken) || void 0;
  return colorClass;
}
var sizeVariants = {
  width: {
    xs: clsx4__default.default("w-28"),
    sm: clsx4__default.default("w-34"),
    md: clsx4__default.default("w-40"),
    lg: clsx4__default.default("w-48")
  },
  height: {
    xs: clsx4__default.default("h-28"),
    sm: clsx4__default.default("h-34"),
    md: clsx4__default.default("h-40"),
    lg: clsx4__default.default("h-48")
  },
  inlineWidth: {
    xs: clsx4__default.default("w-16 text-xs"),
    sm: clsx4__default.default("w-20 text-xs"),
    md: clsx4__default.default("w-22 text-xs"),
    lg: clsx4__default.default("w-26 text-xs")
  },
  inlineHeight: {
    xs: clsx4__default.default("h-16 text-xs"),
    sm: clsx4__default.default("h-20 text-xs"),
    md: clsx4__default.default("h-22 text-xs"),
    lg: clsx4__default.default("h-26 text-xs")
  },
  textSize: {
    xs: "text-xs",
    sm: "text-sm",
    md: "text-md",
    lg: "text-lg"
  },
  lineHeight: {
    xs: "leading-xs",
    sm: "leading-sm",
    md: "leading-md",
    lg: "leading-lg"
  },
  paddingY: {
    xs: "py-4",
    sm: "py-6",
    md: "py-8",
    lg: "py-10"
  },
  paddingX: {
    xs: clsx4__default.default("px-4"),
    sm: clsx4__default.default("px-6"),
    md: clsx4__default.default("px-8"),
    lg: clsx4__default.default("px-10")
  },
  extraPaddingX: {
    xs: clsx4__default.default("px-14"),
    sm: clsx4__default.default("px-16"),
    md: clsx4__default.default("px-18"),
    lg: clsx4__default.default("px-20")
  }
};

// src/styles/input-component.variants.ts
var inputComponentVariants = classedVariantMap({
  size: sizeVariants,
  rounded: {
    roundedLeft: "rounded-r-0 rounded-l-md",
    roundedRight: "rounded-l-0 rounded-r-md",
    rounded: "rounded-md"
  }
});
react.classed("div", {
  variants: {
    orientation: {
      horizontal: "inline-flex flex-row items-center ",
      vertical: "flex flex-col justify-center"
    }
  }
});
var inputComponentWidths = {
  xs: clsx4__default.default("w-168"),
  sm: clsx4__default.default("w-184"),
  md: clsx4__default.default("w-216"),
  lg: clsx4__default.default("w-400")
};
var inputComponentMinWidths = {
  none: "",
  xs: clsx4__default.default("min-w-[168px]"),
  sm: clsx4__default.default("min-w-[184px]"),
  md: clsx4__default.default("min-w-[216px]"),
  lg: clsx4__default.default("min-w-[400px]")
};
react.classed("div", {
  variants: {
    size: {
      xs: "",
      sm: "",
      md: "",
      lg: ""
    },
    minWidth: inputComponentMinWidths,
    width: {
      autoWidth: "w-auto",
      fullWidth: "!w-full",
      fixedWidth: ""
    }
  },
  defaultVariants: {
    width: "fixedWidth",
    size: "md"
  },
  compoundVariants: [
    { size: "xs", width: "fixedWidth", class: inputComponentWidths.xs },
    { size: "sm", width: "fixedWidth", class: inputComponentWidths.sm },
    { size: "md", width: "fixedWidth", class: inputComponentWidths.md },
    { size: "lg", width: "fixedWidth", class: inputComponentWidths.lg }
  ]
});
var inputSizeVariants = mergeVariants([
  inputComponentVariants.size.lineHeight,
  inputComponentVariants.size.paddingX,
  inputComponentVariants.size.paddingY,
  inputComponentVariants.size.textSize
]);
react.classed("div", "inline-flex", {
  variants: {
    size: inputSizeVariants
  }
});
var headingTextSize = {
  h1: clsx4__default.default("text-h1"),
  h2: clsx4__default.default("text-h2"),
  h3: clsx4__default.default("text-h3"),
  h4: clsx4__default.default("text-h4"),
  h5: clsx4__default.default("text-h5"),
  h6: clsx4__default.default("text-h6")
};
var textSize = {
  xs: clsx4__default.default("text-xs"),
  sm: clsx4__default.default("text-sm"),
  md: clsx4__default.default("text-md"),
  lg: clsx4__default.default("text-lg")
};
var textVariants = {
  fontWeight: {
    regular: clsx4__default.default("font-regular"),
    medium: clsx4__default.default("font-medium"),
    bold: clsx4__default.default("font-bold")
  },
  size: {
    ...textSize,
    ...headingTextSize
  },
  font: {
    body: "font-body",
    heading: "font-heading",
    mono: "font-mono"
  },
  leading: {
    none: clsx4__default.default("leading-none"),
    xs: clsx4__default.default("leading-xs"),
    sm: clsx4__default.default("leading-sm"),
    md: clsx4__default.default("leading-md"),
    lg: clsx4__default.default("leading-lg"),
    h1: clsx4__default.default("leading-h1"),
    h2: clsx4__default.default("leading-h2"),
    h3: clsx4__default.default("leading-h3"),
    h4: clsx4__default.default("leading-h4"),
    h5: clsx4__default.default("leading-h5"),
    h6: clsx4__default.default("leading-h6")
  },
  spaceY: {
    xs: clsx4__default.default("space-y-4"),
    sm: clsx4__default.default("space-y-6"),
    md: clsx4__default.default("space-y-8"),
    lg: clsx4__default.default("space-y-16")
  },
  spaceX: {
    xs: clsx4__default.default("space-x-4"),
    sm: clsx4__default.default("space-x-6"),
    md: clsx4__default.default("space-x-8"),
    lg: clsx4__default.default("space-x-16")
  },
  color: {
    inherit: clsx4__default.default("text-inherit"),
    current: clsx4__default.default("text-current"),
    tint: clsx4__default.default("text-content-tint"),
    ghost: clsx4__default.default("text-content-ghost"),
    subtle: clsx4__default.default("text-content-subtle"),
    medium: clsx4__default.default("text-content"),
    weak: clsx4__default.default("text-content-weak"),
    moderate: clsx4__default.default("text-content-moderate"),
    high: clsx4__default.default("text-content-high"),
    intense: clsx4__default.default("text-content-intense"),
    strong: clsx4__default.default("text-content-intense"),
    inverse: clsx4__default.default("text-inverse"),
    danger: clsx4__default.default("text-danger")
  },
  align: {
    center: clsx4__default.default("text-center"),
    right: clsx4__default.default("text-right"),
    left: clsx4__default.default("text-left"),
    start: clsx4__default.default("text-left"),
    end: clsx4__default.default("text-end")
  },
  maxLines: {
    1: "line-clamp-1",
    2: "line-clamp-2",
    3: "line-clamp-3",
    4: "line-clamp-4",
    5: "line-clamp-5",
    6: "line-clamp-6"
  }
};

// src/components/Button/Button.styles.tsx
var buttonVariants = {
  variants: {
    loading: {
      true: "cursor-default"
    },
    cursorPointer: {
      false: "cursor-auto"
    },
    size: mergeVariants(
      [inputComponentVariants.size.paddingX, inputComponentVariants.size.paddingY],
      {
        xs: "text-xs px-6",
        sm: "text-sm",
        md: "text-sm",
        lg: "text-sm"
      }
    ),
    fontWeight: textVariants.fontWeight,
    noWrap: {
      true: "whitespace-nowrap"
    },
    inline: {
      true: "inline"
    },
    justify: {
      center: "justify-center",
      start: "justify-start",
      end: "justify-end"
    },
    fullWidth: {
      true: "w-full"
    },
    hoverable: {
      true: ""
    },
    variant: {
      filled: "",
      outlined: "ring-[1.35px] ring-inset",
      glass: "",
      text: "",
      ghost: ""
    },
    rounded: {
      sm: clsx4__default.default("rounded "),
      default: clsx4__default.default("rounded"),
      true: "rounded-full"
    },
    gradient: {
      true: ""
    },
    coloredShadow: {
      true: ""
    },
    extraRoundedPadding: {
      true: ""
    },
    color: {
      primary: "",
      secondary: "",
      surface: "",
      inverse: "",
      info: "",
      success: "",
      danger: "",
      caution: "",
      heart: ""
    },
    hoverBackgroundColor: {
      primary: "",
      secondary: "",
      inverse: "",
      info: "",
      success: "",
      danger: "",
      caution: "",
      heart: ""
    },
    backgroundNoise: {
      true: "noisy-surface-texture"
    },
    gap: {
      true: ""
    }
  },
  compoundVariants: [
    ...generateCompoundVariants({
      gap: true,
      size: {
        xs: clsx4__default.default("gap-4"),
        sm: clsx4__default.default("gap-6"),
        md: clsx4__default.default("gap-6"),
        lg: clsx4__default.default("gap-6")
      }
    }),
    ...generateCompoundVariants({
      variant: "filled",
      color: {
        primary: "filled-accent-primary",
        secondary: "filled-accent-secondary",
        inverse: "filled-accent-inverse",
        heart: "filled-accent-heart",
        info: "filled-accent-info",
        success: "filled-accent-success",
        danger: "filled-accent-danger",
        caution: "filled-accent-caution"
      }
    }),
    ...generateCompoundVariants({
      variant: "filled",
      hoverable: true,
      color: {
        primary: "filled-hover-accent-primary",
        secondary: "filled-hover-accent-secondary",
        inverse: "filled-hover-accent-inverse",
        heart: "filled-hover-accent-heart",
        info: "filled-hover-accent-info",
        success: "filled-hover-accent-success",
        danger: "filled-hover-accent-danger",
        caution: "filled-hover-accent-caution"
      }
    }),
    ...generateCompoundVariants({
      variant: "filled",
      hoverBackgroundColor: {
        primary: "filled-hover-accent-primary",
        secondary: "filled-hover-accent-secondary",
        inverse: "filled-hover-accent-inverse",
        heart: "filled-hover-accent-heart",
        info: "filled-hover-accent-info",
        success: "filled-hover-accent-success",
        danger: "filled-hover-accent-danger",
        caution: "filled-hover-accent-caution"
      }
    }),
    ...generateCompoundVariants({
      variant: "glass",
      hoverBackgroundColor: {
        primary: "hover:glass-accent-primary",
        secondary: "hover:glass-accent-secondary",
        inverse: "hover:glass-accent-inverse",
        heart: "hover:glass-accent-heart",
        info: "hover:glass-accent-info",
        success: "hover:glass-accent-success",
        danger: "hover:glass-accent-danger",
        caution: "hover:glass-accent-caution"
      }
    }),
    ...generateCompoundVariants({
      variant: "glass",
      className: "overflow-hidden",
      color: {
        primary: "glass-accent-primary",
        secondary: "glass-accent-secondary",
        inverse: "glass-accent-inverse",
        heart: "glass-accent-heart",
        info: "glass-accent-info",
        success: "glass-accent-success",
        danger: "glass-accent-danger",
        caution: "glass-accent-caution"
      }
    }),
    ...generateCompoundVariants({
      variant: "ghost",
      className: "overflow-hidden bg-transparent",
      color: {
        primary: "ghost-accent-primary",
        secondary: "ghost-accent-secondary",
        inverse: "ghost-accent-inverse",
        heart: "ghost-accent-heart",
        info: "ghost-accent-info",
        success: "ghost-accent-success",
        danger: "ghost-accent-danger",
        caution: "ghost-accent-caution"
      }
    }),
    ...generateCompoundVariants({
      variant: "outlined",
      className: "overflow-hidden z-0 bg-surface-soft",
      color: {
        primary: "ring-boundary-weak",
        secondary: "ring-boundary-weak",
        inverse: "text-inverse ring-inverse",
        heart: "text-heart ring-heart",
        info: "text-info ring-info",
        success: "text-success ring-success",
        danger: "text-danger ring-danger",
        caution: "text-caution ring-caution"
      }
    }),
    // Colored Shadow
    ...generateCompoundVariants({
      coloredShadow: true,
      className: clsx4__default.default("shadow-lg "),
      color: {
        primary: "shadow-primary/70",
        secondary: "shadow-secondary/70",
        inverse: "shadow-inverse/70",
        heart: "shadow-heart/70",
        info: "shadow-info/70",
        success: "shadow-success/70",
        danger: "shadow-danger/70",
        caution: "shadow-caution/70"
      }
    }),
    // Gradient
    ...generateCompoundVariants({
      gradient: true,
      variant: "filled",
      className: clsx4__default.default("border-none transition-all hover:brightness-[1.05]"),
      color: {
        primary: clsx4__default.default("bg-gradient-primary-dark-to-light-tr"),
        secondary: clsx4__default.default("bg-gradient-secondary-dark-to-light-tr"),
        inverse: clsx4__default.default("bg-gradient-inverse-dark-to-light-tr"),
        heart: clsx4__default.default("bg-gradient-heart-dark-to-light-tr"),
        info: clsx4__default.default("bg-gradient-info-dark-to-light-tr"),
        success: clsx4__default.default("bg-gradient-success-dark-to-light-tr"),
        danger: clsx4__default.default("bg-gradient-danger-dark-to-light-tr"),
        caution: clsx4__default.default("bg-gradient-caution-dark-to-light-tr")
      }
    }),
    // Extra Padding X
    ...generateCompoundVariants({
      rounded: true,
      extraRoundedPadding: true,
      size: sizeVariants.extraPaddingX
    })
  ]
};
var ButtonElement = classed.button(
  "inline-flex font-medium items-center justify-center select-none align-middle",
  "disabled:text-content-tint disabled:cursor-default disabled:pointer-events-none relative",
  "transition-colors duration-100",
  "box-border",
  "shrink-0",
  {
    defaultVariants: {
      size: "md",
      rounded: "default",
      noWrap: true,
      fontWeight: "medium",
      hoverable: true,
      color: "primary",
      justify: "center",
      variant: "filled",
      extraRoundedPadding: true,
      gap: true
    },
    variants: buttonVariants.variants,
    compoundVariants: buttonVariants.compoundVariants
  }
);
var DiscardButtonElement = classed(
  "button",
  "rounded-full focus:ring-opacity-50",
  "hover:bg-black/10 dark:hover:bg-white/10",
  "flex justify-center",
  {
    variants: {
      color: mergeVariants([colorVariants.focusRing])
    }
  }
);
var DiscardButton = react.deriveClassed((props, ref) => {
  return /* @__PURE__ */ jsxRuntime.jsx(DiscardButtonElement, { type: "button", ref, ...props, children: /* @__PURE__ */ jsxRuntime.jsx(XMarkIcon__default.default, { className: "h-16 w-16" }) });
});
var StatusBadgeElement = classed(ButtonElement, {
  variants: {
    clickable: {
      true: "cursor-pointer",
      false: "cursor-auto"
    },
    size: mergeVariants([
      inputComponentVariants.size.paddingX,
      inputComponentVariants.size.inlineHeight,
      inputComponentVariants.size.lineHeight,
      inputComponentVariants.size.textSize
    ]),
    rounded: {
      true: "rounded",
      false: "",
      full: "rounded-full"
    }
  },
  defaultVariants: {
    // @ts-expect-error inherited default
    hoverable: false
  }
});
var StatusBadge = ({
  children: childrenProp,
  label: labelProp,
  size,
  color: colorProp = "distinct",
  onClick,
  className,
  onDiscard,
  disabled
}) => {
  const label = labelProp ?? typeof childrenProp === "string" ? childrenProp : void 0;
  const children = childrenProp ?? labelProp;
  const distinctColorClass = stringToDistinctColorClass(label, { bg: true });
  const [colorClass, setColorClass] = React.useState(void 0);
  const color = colorProp === "distinct" ? void 0 : colorProp;
  React__default.default.useLayoutEffect(() => {
    if (colorProp === "distinct") {
      fetchStatusColor(label, { bg: true, text: true }).then((value) => {
        if (value) {
          setColorClass(value);
        } else {
          setColorClass(distinctColorClass);
        }
      }).catch(() => {
      });
    }
  }, [colorProp, distinctColorClass, label]);
  const clickable = Boolean(onClick);
  return /* @__PURE__ */ jsxRuntime.jsxs(
    StatusBadgeElement,
    {
      clickable,
      size,
      onClick,
      color,
      hoverable: false,
      disabled,
      className: tailwindMerge.twMerge(colorClass, className),
      rounded: "full",
      children: [
        children,
        onDiscard && /* @__PURE__ */ jsxRuntime.jsx(
          DiscardButton,
          {
            color,
            className: "-mr-2 opacity-70 focus:opacity-100",
            onClick: (e) => {
              e.stopPropagation();
              onDiscard();
            }
          }
        )
      ]
    }
  );
};

exports.DiscardButtonElement = DiscardButtonElement;
exports.StatusBadge = StatusBadge;
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.cjs.map