import { jsx } from 'react/jsx-runtime';
import { TAILWIND_BOX_SHADOW_COLOR_CLASSES, TAILWIND_TEXT_COLOR_CLASSES, SHADCN_TAILWIND_TEXT_COLOR_CLASSES, TAILWIND_BACKGROUND_COLOR_CLASSES, SHADCN_TAILWIND_BACKGROUND_COLOR_CLASSES, TAILWIND_BORDER_COLOR_CLASSES, SHADCN_TAILWIND_BORDER_COLOR_CLASSES } from '../../utils/tailwind-classes.mjs';
import { ThemeAwareDropdownOption } from './theme-aware-dropdown-option.mjs';
import { DropdownOption } from './toggle-group.mjs';

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__ */ jsx(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__ */ jsx(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(
  SHADCN_TAILWIND_BORDER_COLOR_CLASSES,
  TAILWIND_BORDER_COLOR_CLASSES,
  "border-",
  "bg-"
);
const THEME_AWARE_BACKGROUND_COLOR_ITEMS = createCombinedColorDropdown(
  SHADCN_TAILWIND_BACKGROUND_COLOR_CLASSES,
  TAILWIND_BACKGROUND_COLOR_CLASSES,
  "bg-",
  "bg-"
);
const THEME_AWARE_TEXT_COLOR_ITEMS = createCombinedColorDropdown(
  SHADCN_TAILWIND_TEXT_COLOR_CLASSES,
  TAILWIND_TEXT_COLOR_CLASSES,
  "text-",
  "bg-"
);
const THEME_AWARE_SHADOW_COLOR_ITEMS = createRegularColorDropdown(
  TAILWIND_BOX_SHADOW_COLOR_CLASSES,
  "shadow-",
  "bg-"
);

export { THEME_AWARE_BACKGROUND_COLOR_ITEMS, THEME_AWARE_BORDER_COLOR_ITEMS, THEME_AWARE_SHADOW_COLOR_ITEMS, THEME_AWARE_TEXT_COLOR_ITEMS, createCombinedColorDropdown, createRegularColorDropdown, createThemeAwareColorDropdown };
