import { mergeThemes } from './mergeThemes.js';
import { makeSemanticColors } from './utilities/makeSemanticColors.js';
import { DefaultPalette } from './colors/DefaultPalette.js';
import { DefaultEffects } from './effects/DefaultEffects.js';
import { DefaultFontStyles } from './fonts/DefaultFontStyles.js';
import { DefaultSpacing } from './spacing/DefaultSpacing.js';

/**
 * Creates a custom theme definition.
 * @param theme - Partial theme object.
 * @param depComments - Whether to include deprecated tags as comments for deprecated slots.
 */
function createTheme(theme, depComments) {
    if (theme === void 0) { theme = {}; }
    if (depComments === void 0) { depComments = false; }
    var isInverted = !!theme.isInverted;
    var baseTheme = {
        palette: DefaultPalette,
        effects: DefaultEffects,
        fonts: DefaultFontStyles,
        spacing: DefaultSpacing,
        isInverted: isInverted,
        disableGlobalClassNames: false,
        semanticColors: makeSemanticColors(DefaultPalette, DefaultEffects, undefined, isInverted, depComments),
        rtl: undefined,
    };
    return mergeThemes(baseTheme, theme);
}

export { createTheme };
