'use strict';

const jsxRuntime = require('react/jsx-runtime');
const tailwindClasses = require('../../utils/tailwind-classes.cjs');
const themeAwareDropdownOption = require('./theme-aware-dropdown-option.cjs');
const toggleGroup = require('./toggle-group.cjs');

function createThemeAwareColorDropdown(colorClasses, classPrefix, bgPrefix) {
  return colorClasses.map((cls) => {
    const colorName = cls.replace(classPrefix, "");
    const colorClass = cls.replace(classPrefix, bgPrefix);
    return {
      value: cls,
      label: /* @__PURE__ */ jsxRuntime.jsx(themeAwareDropdownOption.ThemeAwareDropdownOption, { color: colorClass, children: colorName })
    };
  });
}
function createRegularColorDropdown(colorClasses, classPrefix, bgPrefix) {
  return colorClasses.map((cls) => {
    const colorName = cls.replace(classPrefix, "");
    const colorClass = cls.replace(classPrefix, bgPrefix);
    return {
      value: cls,
      label: /* @__PURE__ */ jsxRuntime.jsx(toggleGroup.DropdownOption, { color: colorClass, children: colorName })
    };
  });
}
function createCombinedColorDropdown(shadcnClasses, tailwindClasses, classPrefix, bgPrefix) {
  const themeColors = createThemeAwareColorDropdown(shadcnClasses, classPrefix, bgPrefix);
  const regularColors = createRegularColorDropdown(tailwindClasses, classPrefix, bgPrefix);
  return [
    ...themeColors,
    ...regularColors
  ];
}
const THEME_AWARE_BORDER_COLOR_ITEMS = createCombinedColorDropdown(
  tailwindClasses.SHADCN_TAILWIND_BORDER_COLOR_CLASSES,
  tailwindClasses.TAILWIND_BORDER_COLOR_CLASSES,
  "border-",
  "bg-"
);
const THEME_AWARE_BACKGROUND_COLOR_ITEMS = createCombinedColorDropdown(
  tailwindClasses.SHADCN_TAILWIND_BACKGROUND_COLOR_CLASSES,
  tailwindClasses.TAILWIND_BACKGROUND_COLOR_CLASSES,
  "bg-",
  "bg-"
);
const THEME_AWARE_TEXT_COLOR_ITEMS = createCombinedColorDropdown(
  tailwindClasses.SHADCN_TAILWIND_TEXT_COLOR_CLASSES,
  tailwindClasses.TAILWIND_TEXT_COLOR_CLASSES,
  "text-",
  "bg-"
);
const THEME_AWARE_SHADOW_COLOR_ITEMS = createRegularColorDropdown(
  tailwindClasses.TAILWIND_BOX_SHADOW_COLOR_CLASSES,
  "shadow-",
  "bg-"
);

exports.THEME_AWARE_BACKGROUND_COLOR_ITEMS = THEME_AWARE_BACKGROUND_COLOR_ITEMS;
exports.THEME_AWARE_BORDER_COLOR_ITEMS = THEME_AWARE_BORDER_COLOR_ITEMS;
exports.THEME_AWARE_SHADOW_COLOR_ITEMS = THEME_AWARE_SHADOW_COLOR_ITEMS;
exports.THEME_AWARE_TEXT_COLOR_ITEMS = THEME_AWARE_TEXT_COLOR_ITEMS;
exports.createCombinedColorDropdown = createCombinedColorDropdown;
exports.createRegularColorDropdown = createRegularColorDropdown;
exports.createThemeAwareColorDropdown = createThemeAwareColorDropdown;
