
import { localize } from '../../../../nls.js';
import { Color, RGBA } from '../../../../base/common/color.js';
import { registerColor, transparent, darken, lighten, ColorTransformType } from '../colorUtils.js';
import { foreground, contrastBorder, focusBorder, iconForeground } from './baseColors.js';
import { editorWidgetBackground } from './editorColors.js';
import { listHoverBackground } from './listColors.js';

const inputBackground = registerColor("input.background", {
    dark: "#3C3C3C",
    light: Color.white,
    hcDark: Color.black,
    hcLight: Color.white
}, ( localize(2354, "Input box background.")));
const inputForeground = registerColor("input.foreground", foreground, ( localize(2355, "Input box foreground.")));
const inputBorder = registerColor("input.border", {
    dark: null,
    light: null,
    hcDark: contrastBorder,
    hcLight: contrastBorder
}, ( localize(2356, "Input box border.")));
const inputActiveOptionBorder = registerColor("inputOption.activeBorder", {
    dark: "#007ACC",
    light: "#007ACC",
    hcDark: contrastBorder,
    hcLight: contrastBorder
}, ( localize(2357, "Border color of activated options in input fields.")));
const inputActiveOptionHoverBackground = registerColor("inputOption.hoverBackground", {
    dark: "#5a5d5e80",
    light: "#b8b8b850",
    hcDark: null,
    hcLight: null
}, ( localize(2358, "Background color of activated options in input fields.")));
const inputActiveOptionBackground = registerColor("inputOption.activeBackground", {
    dark: ( transparent(focusBorder, 0.4)),
    light: ( transparent(focusBorder, 0.2)),
    hcDark: Color.transparent,
    hcLight: Color.transparent
}, ( localize(2359, "Background hover color of options in input fields.")));
const inputActiveOptionForeground = registerColor("inputOption.activeForeground", {
    dark: Color.white,
    light: Color.black,
    hcDark: foreground,
    hcLight: foreground
}, ( localize(2360, "Foreground color of activated options in input fields.")));
const inputPlaceholderForeground = registerColor("input.placeholderForeground", {
    light: ( transparent(foreground, 0.5)),
    dark: ( transparent(foreground, 0.5)),
    hcDark: ( transparent(foreground, 0.7)),
    hcLight: ( transparent(foreground, 0.7))
}, ( localize(2361, "Input box foreground color for placeholder text.")));
const inputValidationInfoBackground = registerColor("inputValidation.infoBackground", {
    dark: "#063B49",
    light: "#D6ECF2",
    hcDark: Color.black,
    hcLight: Color.white
}, ( localize(2362, "Input validation background color for information severity.")));
const inputValidationInfoForeground = registerColor("inputValidation.infoForeground", {
    dark: null,
    light: null,
    hcDark: null,
    hcLight: foreground
}, ( localize(2363, "Input validation foreground color for information severity.")));
const inputValidationInfoBorder = registerColor("inputValidation.infoBorder", {
    dark: "#007acc",
    light: "#007acc",
    hcDark: contrastBorder,
    hcLight: contrastBorder
}, ( localize(2364, "Input validation border color for information severity.")));
const inputValidationWarningBackground = registerColor("inputValidation.warningBackground", {
    dark: "#352A05",
    light: "#F6F5D2",
    hcDark: Color.black,
    hcLight: Color.white
}, ( localize(2365, "Input validation background color for warning severity.")));
const inputValidationWarningForeground = registerColor("inputValidation.warningForeground", {
    dark: null,
    light: null,
    hcDark: null,
    hcLight: foreground
}, ( localize(2366, "Input validation foreground color for warning severity.")));
const inputValidationWarningBorder = registerColor("inputValidation.warningBorder", {
    dark: "#B89500",
    light: "#B89500",
    hcDark: contrastBorder,
    hcLight: contrastBorder
}, ( localize(2367, "Input validation border color for warning severity.")));
const inputValidationErrorBackground = registerColor("inputValidation.errorBackground", {
    dark: "#5A1D1D",
    light: "#F2DEDE",
    hcDark: Color.black,
    hcLight: Color.white
}, ( localize(2368, "Input validation background color for error severity.")));
const inputValidationErrorForeground = registerColor("inputValidation.errorForeground", {
    dark: null,
    light: null,
    hcDark: null,
    hcLight: foreground
}, ( localize(2369, "Input validation foreground color for error severity.")));
const inputValidationErrorBorder = registerColor("inputValidation.errorBorder", {
    dark: "#BE1100",
    light: "#BE1100",
    hcDark: contrastBorder,
    hcLight: contrastBorder
}, ( localize(2370, "Input validation border color for error severity.")));
const selectBackground = registerColor("dropdown.background", {
    dark: "#3C3C3C",
    light: Color.white,
    hcDark: Color.black,
    hcLight: Color.white
}, ( localize(2371, "Dropdown background.")));
const selectListBackground = registerColor("dropdown.listBackground", {
    dark: null,
    light: null,
    hcDark: Color.black,
    hcLight: Color.white
}, ( localize(2372, "Dropdown list background.")));
const selectForeground = registerColor("dropdown.foreground", {
    dark: "#F0F0F0",
    light: foreground,
    hcDark: Color.white,
    hcLight: foreground
}, ( localize(2373, "Dropdown foreground.")));
const selectBorder = registerColor("dropdown.border", {
    dark: selectBackground,
    light: "#CECECE",
    hcDark: contrastBorder,
    hcLight: contrastBorder
}, ( localize(2374, "Dropdown border.")));
const buttonForeground = registerColor("button.foreground", Color.white, ( localize(2375, "Button foreground color.")));
const buttonSeparator = registerColor("button.separator", ( transparent(buttonForeground, .4)), ( localize(2376, "Button separator color.")));
const buttonBackground = registerColor("button.background", {
    dark: "#0E639C",
    light: "#007ACC",
    hcDark: Color.black,
    hcLight: "#0F4A85"
}, ( localize(2377, "Button background color.")));
const buttonHoverBackground = registerColor("button.hoverBackground", {
    dark: ( lighten(buttonBackground, 0.2)),
    light: ( darken(buttonBackground, 0.2)),
    hcDark: buttonBackground,
    hcLight: buttonBackground
}, ( localize(2378, "Button background color when hovering.")));
const buttonBorder = registerColor("button.border", contrastBorder, ( localize(2379, "Button border color.")));
const buttonSecondaryForeground = registerColor("button.secondaryForeground", {
    dark: foreground,
    light: foreground,
    hcDark: Color.white,
    hcLight: foreground
}, ( localize(2380, "Secondary button foreground color.")));
const buttonSecondaryBackground = registerColor("button.secondaryBackground", {
    dark: listHoverBackground,
    light: listHoverBackground,
    hcDark: null,
    hcLight: Color.white
}, ( localize(2381, "Secondary button background color.")));
const buttonSecondaryBorder = registerColor("button.secondaryBorder", {
    dark: ( transparent(foreground, 0.15)),
    light: ( transparent(foreground, 0.15)),
    hcDark: contrastBorder,
    hcLight: contrastBorder
}, ( localize(2382, "Secondary button border color.")));
const buttonSecondaryHoverBackground = registerColor("button.secondaryHoverBackground", {
    dark: ( lighten(listHoverBackground, 0.2)),
    light: ( lighten(listHoverBackground, 0.2)),
    hcDark: null,
    hcLight: null
}, ( localize(2383, "Secondary button background color when hovering.")));
const radioActiveForeground = registerColor("radio.activeForeground", inputActiveOptionForeground, ( localize(2384, "Foreground color of active radio option.")));
const radioActiveBackground = registerColor("radio.activeBackground", inputActiveOptionBackground, ( localize(2385, "Background color of active radio option.")));
const radioActiveBorder = registerColor("radio.activeBorder", inputActiveOptionBorder, ( localize(2386, "Border color of the active radio option.")));
const radioInactiveForeground = registerColor("radio.inactiveForeground", null, ( localize(2387, "Foreground color of inactive radio option.")));
const radioInactiveBackground = registerColor("radio.inactiveBackground", null, ( localize(2388, "Background color of inactive radio option.")));
const radioInactiveBorder = registerColor("radio.inactiveBorder", {
    light: ( transparent(radioActiveForeground, .2)),
    dark: ( transparent(radioActiveForeground, .2)),
    hcDark: ( transparent(radioActiveForeground, .4)),
    hcLight: ( transparent(radioActiveForeground, .2))
}, ( localize(2389, "Border color of the inactive radio option.")));
const radioInactiveHoverBackground = registerColor(
    "radio.inactiveHoverBackground",
    inputActiveOptionHoverBackground,
    ( localize(2390, "Background color of inactive active radio option when hovering."))
);
const checkboxBackground = registerColor("checkbox.background", selectBackground, ( localize(2391, "Background color of checkbox widget.")));
registerColor("checkbox.selectBackground", editorWidgetBackground, ( localize(
    2392,
    "Background color of checkbox widget when the element it's in is selected."
)));
const checkboxForeground = registerColor("checkbox.foreground", selectForeground, ( localize(2393, "Foreground color of checkbox widget.")));
const checkboxBorder = registerColor("checkbox.border", selectBorder, ( localize(2394, "Border color of checkbox widget.")));
registerColor("checkbox.selectBorder", iconForeground, ( localize(
    2395,
    "Border color of checkbox widget when the element it's in is selected."
)));
const checkboxDisabledBackground = registerColor("checkbox.disabled.background", {
    op: ColorTransformType.Mix,
    color: checkboxBackground,
    with: checkboxForeground,
    ratio: 0.33
}, ( localize(2396, "Background of a disabled checkbox.")));
const checkboxDisabledForeground = registerColor("checkbox.disabled.foreground", {
    op: ColorTransformType.Mix,
    color: checkboxForeground,
    with: checkboxBackground,
    ratio: 0.33
}, ( localize(2397, "Foreground of a disabled checkbox.")));
const keybindingLabelBackground = registerColor("keybindingLabel.background", {
    dark: ( new Color(( new RGBA(128, 128, 128, 0.17)))),
    light: ( new Color(( new RGBA(221, 221, 221, 0.4)))),
    hcDark: Color.transparent,
    hcLight: Color.transparent
}, ( localize(
    2398,
    "Keybinding label background color. The keybinding label is used to represent a keyboard shortcut."
)));
const keybindingLabelForeground = registerColor("keybindingLabel.foreground", {
    dark: ( Color.fromHex("#CCCCCC")),
    light: ( Color.fromHex("#555555")),
    hcDark: Color.white,
    hcLight: foreground
}, ( localize(
    2399,
    "Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut."
)));
const keybindingLabelBorder = registerColor("keybindingLabel.border", {
    dark: ( new Color(( new RGBA(51, 51, 51, 0.6)))),
    light: ( new Color(( new RGBA(204, 204, 204, 0.4)))),
    hcDark: ( new Color(( new RGBA(111, 195, 223)))),
    hcLight: contrastBorder
}, ( localize(
    2400,
    "Keybinding label border color. The keybinding label is used to represent a keyboard shortcut."
)));
const keybindingLabelBottomBorder = registerColor("keybindingLabel.bottomBorder", {
    dark: ( new Color(( new RGBA(68, 68, 68, 0.6)))),
    light: ( new Color(( new RGBA(187, 187, 187, 0.4)))),
    hcDark: ( new Color(( new RGBA(111, 195, 223)))),
    hcLight: foreground
}, ( localize(
    2401,
    "Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut."
)));

export { buttonBackground, buttonBorder, buttonForeground, buttonHoverBackground, buttonSecondaryBackground, buttonSecondaryBorder, buttonSecondaryForeground, buttonSecondaryHoverBackground, buttonSeparator, checkboxBackground, checkboxBorder, checkboxDisabledBackground, checkboxDisabledForeground, checkboxForeground, inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground, inputActiveOptionHoverBackground, inputBackground, inputBorder, inputForeground, inputPlaceholderForeground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationInfoForeground, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationWarningForeground, keybindingLabelBackground, keybindingLabelBorder, keybindingLabelBottomBorder, keybindingLabelForeground, radioActiveBackground, radioActiveBorder, radioActiveForeground, radioInactiveBackground, radioInactiveBorder, radioInactiveForeground, radioInactiveHoverBackground, selectBackground, selectBorder, selectForeground, selectListBackground };
