import { keybindingLabelBackground, keybindingLabelBorder, keybindingLabelBottomBorder, keybindingLabelForeground, asCssValue, widgetShadow, buttonForeground, buttonSeparator, buttonBackground, buttonHoverBackground, buttonSecondaryForeground, buttonSecondaryBackground, buttonSecondaryHoverBackground, buttonBorder, progressBarBackground, inputActiveOptionBorder, inputActiveOptionForeground, inputActiveOptionBackground, editorWidgetBackground, editorWidgetForeground, contrastBorder, checkboxBorder, checkboxBackground, checkboxForeground, problemsErrorIconForeground, problemsWarningIconForeground, problemsInfoIconForeground, inputBackground, inputForeground, inputBorder, textLinkForeground, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationInfoForeground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationWarningForeground, inputValidationErrorBorder, inputValidationErrorBackground, inputValidationErrorForeground, listFilterWidgetBackground, listFilterWidgetNoMatchesOutline, listFilterWidgetOutline, listFilterWidgetShadow, badgeBackground, badgeForeground, breadcrumbsBackground, breadcrumbsForeground, breadcrumbsFocusForeground, breadcrumbsActiveSelectionForeground, activeContrastBorder, listActiveSelectionBackground, listActiveSelectionForeground, listActiveSelectionIconForeground, listDropBackground, listFocusAndSelectionOutline, listFocusBackground, listFocusForeground, listFocusOutline, listHoverBackground, listHoverForeground, listInactiveFocusBackground, listInactiveFocusOutline, listInactiveSelectionBackground, listInactiveSelectionForeground, listInactiveSelectionIconForeground, tableColumnsBorder, tableOddRowsBackgroundColor, treeIndentGuidesStroke, asCssValueWithDefault, editorWidgetBorder, focusBorder, pickerGroupForeground, quickInputListFocusBackground, quickInputListFocusForeground, quickInputListFocusIconForeground, selectBackground, selectBorder, selectForeground, selectListBackground, treeInactiveIndentGuidesStroke, menuBorder, menuForeground, menuBackground, menuSelectionForeground, menuSelectionBackground, menuSelectionBorder, menuSeparatorBackground, scrollbarShadow, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground } from '../common/colorRegistry.js';
import { Color } from '../../../base/common/color.js';
export const defaultKeybindingLabelStyles = getKeybindingLabelStyles({});
export function getKeybindingLabelStyles(override) {
    var _a, _b, _c, _d, _e;
    return {
        keybindingLabelBackground: asCssValue((_a = override.keybindingLabelBackground) !== null && _a !== void 0 ? _a : keybindingLabelBackground),
        keybindingLabelForeground: asCssValue((_b = override.keybindingLabelForeground) !== null && _b !== void 0 ? _b : keybindingLabelForeground),
        keybindingLabelBorder: asCssValue((_c = override.keybindingLabelBorder) !== null && _c !== void 0 ? _c : keybindingLabelBorder),
        keybindingLabelBottomBorder: asCssValue((_d = override.keybindingLabelBottomBorder) !== null && _d !== void 0 ? _d : keybindingLabelBottomBorder),
        keybindingLabelShadow: asCssValue((_e = override.keybindingLabelShadow) !== null && _e !== void 0 ? _e : widgetShadow)
    };
}
export const defaultButtonStyles = getButtonStyles({});
export function getButtonStyles(override) {
    var _a, _b, _c, _d, _e, _f, _g, _h;
    return {
        buttonForeground: asCssValue((_a = override.buttonForeground) !== null && _a !== void 0 ? _a : buttonForeground),
        buttonSeparator: asCssValue((_b = override.buttonSeparator) !== null && _b !== void 0 ? _b : buttonSeparator),
        buttonBackground: asCssValue((_c = override.buttonBackground) !== null && _c !== void 0 ? _c : buttonBackground),
        buttonHoverBackground: asCssValue((_d = override.buttonHoverBackground) !== null && _d !== void 0 ? _d : buttonHoverBackground),
        buttonSecondaryForeground: asCssValue((_e = override.buttonSecondaryForeground) !== null && _e !== void 0 ? _e : buttonSecondaryForeground),
        buttonSecondaryBackground: asCssValue((_f = override.buttonSecondaryBackground) !== null && _f !== void 0 ? _f : buttonSecondaryBackground),
        buttonSecondaryHoverBackground: asCssValue((_g = override.buttonSecondaryHoverBackground) !== null && _g !== void 0 ? _g : buttonSecondaryHoverBackground),
        buttonBorder: asCssValue((_h = override.buttonBorder) !== null && _h !== void 0 ? _h : buttonBorder),
    };
}
export const defaultProgressBarStyles = getProgressBarStyles({});
export function getProgressBarStyles(override) {
    var _a;
    return {
        progressBarBackground: asCssValue((_a = override.progressBarBackground) !== null && _a !== void 0 ? _a : progressBarBackground)
    };
}
export const defaultToggleStyles = getToggleStyles({});
export function getToggleStyles(override) {
    var _a, _b, _c;
    return {
        inputActiveOptionBorder: asCssValue((_a = override.inputActiveOptionBorder) !== null && _a !== void 0 ? _a : inputActiveOptionBorder),
        inputActiveOptionForeground: asCssValue((_b = override.inputActiveOptionForeground) !== null && _b !== void 0 ? _b : inputActiveOptionForeground),
        inputActiveOptionBackground: asCssValue((_c = override.inputActiveOptionBackground) !== null && _c !== void 0 ? _c : inputActiveOptionBackground)
    };
}
export const defaultCheckboxStyles = getCheckboxStyles({});
export function getCheckboxStyles(override) {
    var _a, _b, _c;
    return {
        checkboxBackground: asCssValue((_a = override.checkboxBackground) !== null && _a !== void 0 ? _a : checkboxBackground),
        checkboxBorder: asCssValue((_b = override.checkboxBorder) !== null && _b !== void 0 ? _b : checkboxBorder),
        checkboxForeground: asCssValue((_c = override.checkboxForeground) !== null && _c !== void 0 ? _c : checkboxForeground)
    };
}
export const defaultDialogStyles = getDialogStyle({});
export function getDialogStyle(override) {
    var _a, _b, _c, _d, _e, _f, _g, _h;
    return {
        dialogBackground: asCssValue((_a = override.dialogBackground) !== null && _a !== void 0 ? _a : editorWidgetBackground),
        dialogForeground: asCssValue((_b = override.dialogForeground) !== null && _b !== void 0 ? _b : editorWidgetForeground),
        dialogShadow: asCssValue((_c = override.dialogShadow) !== null && _c !== void 0 ? _c : widgetShadow),
        dialogBorder: asCssValue((_d = override.dialogBorder) !== null && _d !== void 0 ? _d : contrastBorder),
        errorIconForeground: asCssValue((_e = override.errorIconForeground) !== null && _e !== void 0 ? _e : problemsErrorIconForeground),
        warningIconForeground: asCssValue((_f = override.warningIconForeground) !== null && _f !== void 0 ? _f : problemsWarningIconForeground),
        infoIconForeground: asCssValue((_g = override.infoIconForeground) !== null && _g !== void 0 ? _g : problemsInfoIconForeground),
        textLinkForeground: asCssValue((_h = override.textLinkForeground) !== null && _h !== void 0 ? _h : textLinkForeground)
    };
}
export const defaultInputBoxStyles = getInputBoxStyle({});
export function getInputBoxStyle(override) {
    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
    return {
        inputBackground: asCssValue((_a = override.inputBackground) !== null && _a !== void 0 ? _a : inputBackground),
        inputForeground: asCssValue((_b = override.inputForeground) !== null && _b !== void 0 ? _b : inputForeground),
        inputBorder: asCssValue((_c = override.inputBorder) !== null && _c !== void 0 ? _c : inputBorder),
        inputValidationInfoBorder: asCssValue((_d = override.inputValidationInfoBorder) !== null && _d !== void 0 ? _d : inputValidationInfoBorder),
        inputValidationInfoBackground: asCssValue((_e = override.inputValidationInfoBackground) !== null && _e !== void 0 ? _e : inputValidationInfoBackground),
        inputValidationInfoForeground: asCssValue((_f = override.inputValidationInfoForeground) !== null && _f !== void 0 ? _f : inputValidationInfoForeground),
        inputValidationWarningBorder: asCssValue((_g = override.inputValidationWarningBorder) !== null && _g !== void 0 ? _g : inputValidationWarningBorder),
        inputValidationWarningBackground: asCssValue((_h = override.inputValidationWarningBackground) !== null && _h !== void 0 ? _h : inputValidationWarningBackground),
        inputValidationWarningForeground: asCssValue((_j = override.inputValidationWarningForeground) !== null && _j !== void 0 ? _j : inputValidationWarningForeground),
        inputValidationErrorBorder: asCssValue((_k = override.inputValidationErrorBorder) !== null && _k !== void 0 ? _k : inputValidationErrorBorder),
        inputValidationErrorBackground: asCssValue((_l = override.inputValidationErrorBackground) !== null && _l !== void 0 ? _l : inputValidationErrorBackground),
        inputValidationErrorForeground: asCssValue((_m = override.inputValidationErrorForeground) !== null && _m !== void 0 ? _m : inputValidationErrorForeground)
    };
}
export const defaultFindWidgetStyles = {
    listFilterWidgetBackground: asCssValue(listFilterWidgetBackground),
    listFilterWidgetOutline: asCssValue(listFilterWidgetOutline),
    listFilterWidgetNoMatchesOutline: asCssValue(listFilterWidgetNoMatchesOutline),
    listFilterWidgetShadow: asCssValue(listFilterWidgetShadow),
    inputBoxStyles: defaultInputBoxStyles,
    toggleStyles: defaultToggleStyles
};
export const defaultCountBadgeStyles = getCountBadgeStyle({});
export function getCountBadgeStyle(override) {
    var _a, _b;
    return {
        badgeBackground: asCssValue((_a = override.badgeBackground) !== null && _a !== void 0 ? _a : badgeBackground),
        badgeForeground: asCssValue((_b = override.badgeForeground) !== null && _b !== void 0 ? _b : badgeForeground),
        badgeBorder: asCssValue(contrastBorder)
    };
}
export const defaultBreadcrumbsWidgetStyles = getBreadcrumbsWidgetStyles({});
export function getBreadcrumbsWidgetStyles(override) {
    var _a, _b, _c, _d, _e;
    return {
        breadcrumbsBackground: asCssValue((_a = override.breadcrumbsBackground) !== null && _a !== void 0 ? _a : breadcrumbsBackground),
        breadcrumbsForeground: asCssValue((_b = override.breadcrumbsForeground) !== null && _b !== void 0 ? _b : breadcrumbsForeground),
        breadcrumbsHoverForeground: asCssValue((_c = override.breadcrumbsFocusForeground) !== null && _c !== void 0 ? _c : breadcrumbsFocusForeground),
        breadcrumbsFocusForeground: asCssValue((_d = override.breadcrumbsFocusForeground) !== null && _d !== void 0 ? _d : breadcrumbsFocusForeground),
        breadcrumbsFocusAndSelectionForeground: asCssValue((_e = override.breadcrumbsFocusAndSelectionForeground) !== null && _e !== void 0 ? _e : breadcrumbsActiveSelectionForeground)
    };
}
export const defaultListStyles = getListStyles({});
export function getListStyles(override) {
    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
    return {
        listBackground: override.listBackground ? asCssValue(override.listBackground) : undefined,
        listInactiveFocusForeground: override.listInactiveFocusForeground ? asCssValue(override.listInactiveFocusForeground) : undefined,
        listFocusBackground: asCssValue((_a = override.listFocusBackground) !== null && _a !== void 0 ? _a : listFocusBackground),
        listFocusForeground: asCssValue((_b = override.listFocusForeground) !== null && _b !== void 0 ? _b : listFocusForeground),
        listFocusOutline: asCssValue((_c = override.listFocusOutline) !== null && _c !== void 0 ? _c : listFocusOutline),
        listActiveSelectionBackground: asCssValue((_d = override.listActiveSelectionBackground) !== null && _d !== void 0 ? _d : listActiveSelectionBackground),
        listActiveSelectionForeground: asCssValue((_e = override.listActiveSelectionForeground) !== null && _e !== void 0 ? _e : listActiveSelectionForeground),
        listActiveSelectionIconForeground: asCssValue((_f = override.listActiveSelectionIconForeground) !== null && _f !== void 0 ? _f : listActiveSelectionIconForeground),
        listFocusAndSelectionOutline: asCssValue((_g = override.listFocusAndSelectionOutline) !== null && _g !== void 0 ? _g : listFocusAndSelectionOutline),
        listFocusAndSelectionBackground: asCssValue((_h = override.listFocusAndSelectionBackground) !== null && _h !== void 0 ? _h : listActiveSelectionBackground),
        listFocusAndSelectionForeground: asCssValue((_j = override.listFocusAndSelectionForeground) !== null && _j !== void 0 ? _j : listActiveSelectionForeground),
        listInactiveSelectionBackground: asCssValue((_k = override.listInactiveSelectionBackground) !== null && _k !== void 0 ? _k : listInactiveSelectionBackground),
        listInactiveSelectionIconForeground: asCssValue((_l = override.listInactiveSelectionIconForeground) !== null && _l !== void 0 ? _l : listInactiveSelectionIconForeground),
        listInactiveSelectionForeground: asCssValue((_m = override.listInactiveSelectionForeground) !== null && _m !== void 0 ? _m : listInactiveSelectionForeground),
        listInactiveFocusBackground: asCssValue((_o = override.listInactiveFocusBackground) !== null && _o !== void 0 ? _o : listInactiveFocusBackground),
        listInactiveFocusOutline: asCssValue((_p = override.listInactiveFocusOutline) !== null && _p !== void 0 ? _p : listInactiveFocusOutline),
        listHoverBackground: asCssValue((_q = override.listHoverBackground) !== null && _q !== void 0 ? _q : listHoverBackground),
        listHoverForeground: asCssValue((_r = override.listHoverForeground) !== null && _r !== void 0 ? _r : listHoverForeground),
        listDropBackground: asCssValue((_s = override.listDropBackground) !== null && _s !== void 0 ? _s : listDropBackground),
        listSelectionOutline: asCssValue((_t = override.listSelectionOutline) !== null && _t !== void 0 ? _t : activeContrastBorder),
        listHoverOutline: asCssValue((_u = override.listHoverOutline) !== null && _u !== void 0 ? _u : activeContrastBorder),
        treeIndentGuidesStroke: asCssValue((_v = override.treeIndentGuidesStroke) !== null && _v !== void 0 ? _v : treeIndentGuidesStroke),
        treeInactiveIndentGuidesStroke: asCssValue((_w = override.treeInactiveIndentGuidesStroke) !== null && _w !== void 0 ? _w : treeInactiveIndentGuidesStroke),
        tableColumnsBorder: asCssValue((_x = override.tableColumnsBorder) !== null && _x !== void 0 ? _x : tableColumnsBorder),
        tableOddRowsBackgroundColor: asCssValue((_y = override.tableOddRowsBackgroundColor) !== null && _y !== void 0 ? _y : tableOddRowsBackgroundColor),
    };
}
export const defaultSelectBoxStyles = getSelectBoxStyles({});
export function getSelectBoxStyles(override) {
    var _a;
    return {
        selectBackground: asCssValue(override.selectBackground || selectBackground),
        selectListBackground: asCssValue(override.selectListBackground || selectListBackground),
        selectForeground: asCssValue(override.selectForeground || selectForeground),
        decoratorRightForeground: asCssValue(override.decoratorRightForeground || pickerGroupForeground),
        selectBorder: asCssValue(override.selectBorder || selectBorder),
        focusBorder: asCssValue(override.focusBorder || focusBorder),
        listFocusBackground: asCssValue(override.listFocusBackground || quickInputListFocusBackground),
        listInactiveSelectionIconForeground: asCssValue(override.listInactiveSelectionIconForeground || quickInputListFocusIconForeground),
        listFocusForeground: asCssValue(override.listFocusForeground || quickInputListFocusForeground),
        listFocusOutline: asCssValueWithDefault((_a = override.listFocusOutline) !== null && _a !== void 0 ? _a : activeContrastBorder, Color.transparent.toString()),
        listHoverBackground: asCssValue(override.listHoverBackground || listHoverBackground),
        listHoverForeground: asCssValue(override.listHoverForeground || listHoverForeground),
        listHoverOutline: asCssValue(override.listFocusOutline || activeContrastBorder),
        selectListBorder: asCssValue(override.selectListBorder || editorWidgetBorder),
        listBackground: undefined,
        listActiveSelectionBackground: undefined,
        listActiveSelectionForeground: undefined,
        listActiveSelectionIconForeground: undefined,
        listFocusAndSelectionBackground: undefined,
        listDropBackground: undefined,
        listInactiveSelectionBackground: undefined,
        listInactiveSelectionForeground: undefined,
        listInactiveFocusBackground: undefined,
        listInactiveFocusOutline: undefined,
        listSelectionOutline: undefined,
        listFocusAndSelectionForeground: undefined,
        listFocusAndSelectionOutline: undefined,
        listInactiveFocusForeground: undefined,
        tableColumnsBorder: undefined,
        tableOddRowsBackgroundColor: undefined,
        treeIndentGuidesStroke: undefined,
        treeInactiveIndentGuidesStroke: undefined,
    };
}
export const defaultMenuStyles = getMenuStyles({});
export function getMenuStyles(override) {
    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
    return {
        shadowColor: asCssValue((_a = override.shadowColor) !== null && _a !== void 0 ? _a : widgetShadow),
        borderColor: asCssValue((_b = override.borderColor) !== null && _b !== void 0 ? _b : menuBorder),
        foregroundColor: asCssValue((_c = override.foregroundColor) !== null && _c !== void 0 ? _c : menuForeground),
        backgroundColor: asCssValue((_d = override.backgroundColor) !== null && _d !== void 0 ? _d : menuBackground),
        selectionForegroundColor: asCssValue((_e = override.selectionForegroundColor) !== null && _e !== void 0 ? _e : menuSelectionForeground),
        selectionBackgroundColor: asCssValue((_f = override.selectionBackgroundColor) !== null && _f !== void 0 ? _f : menuSelectionBackground),
        selectionBorderColor: asCssValue((_g = override.selectionBorderColor) !== null && _g !== void 0 ? _g : menuSelectionBorder),
        separatorColor: asCssValue((_h = override.separatorColor) !== null && _h !== void 0 ? _h : menuSeparatorBackground),
        scrollbarShadow: asCssValue((_j = override.scrollbarShadow) !== null && _j !== void 0 ? _j : scrollbarShadow),
        scrollbarSliderBackground: asCssValue((_k = override.scrollbarSliderBackground) !== null && _k !== void 0 ? _k : scrollbarSliderBackground),
        scrollbarSliderHoverBackground: asCssValue((_l = override.scrollbarSliderHoverBackground) !== null && _l !== void 0 ? _l : scrollbarSliderHoverBackground),
        scrollbarSliderActiveBackground: asCssValue((_m = override.scrollbarSliderActiveBackground) !== null && _m !== void 0 ? _m : scrollbarSliderActiveBackground)
    };
}
