import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { ComparisonColorType } from "@gooddata/sdk-ui-charts";
import { ColorCheckbox } from "./ColorCheckbox.js";
import { ColorItem } from "./ColorItem.js";
import { ColorResetButton } from "./ColorResetButton.js";
import { comparisonMessages } from "../../../../../../locales.js";
import { COMPARISON_COLOR_CONFIG_EQUALS, COMPARISON_COLOR_CONFIG_NEGATIVE, COMPARISON_COLOR_CONFIG_POSITIVE, } from "../../ComparisonValuePath.js";
export function ColorsControl({ disabled, showDisabledMessage, properties, colorPalette, pushData, }) {
    const colorConfig = properties?.controls?.comparison?.colorConfig;
    const isColorDisabled = disabled || colorConfig?.disabled;
    return (_jsxs("div", { className: "comparison-color-control s-comparison-color-control", children: [_jsx(ColorCheckbox, { disabled: disabled, showDisabledMessage: showDisabledMessage, properties: properties, pushData: pushData }), _jsxs("div", { className: "comparison-color-list-item s-comparison-color-list-item", children: [_jsx(ColorItem, { disabled: isColorDisabled, showDisabledMessage: showDisabledMessage, color: colorConfig?.positive, colorType: ComparisonColorType.POSITIVE, colorPalette: colorPalette, valuePath: COMPARISON_COLOR_CONFIG_POSITIVE, labelDescriptor: comparisonMessages["colorsConfigPositive"], properties: properties, pushData: pushData }), _jsx(ColorItem, { disabled: isColorDisabled, showDisabledMessage: showDisabledMessage, color: colorConfig?.negative, colorType: ComparisonColorType.NEGATIVE, colorPalette: colorPalette, valuePath: COMPARISON_COLOR_CONFIG_NEGATIVE, labelDescriptor: comparisonMessages["colorsConfigNegative"], properties: properties, pushData: pushData }), _jsx(ColorItem, { disabled: isColorDisabled, showDisabledMessage: showDisabledMessage, color: colorConfig?.equals, colorType: ComparisonColorType.EQUALS, colorPalette: colorPalette, valuePath: COMPARISON_COLOR_CONFIG_EQUALS, labelDescriptor: comparisonMessages["colorsConfigEquals"], properties: properties, pushData: pushData })] }), _jsx(ColorResetButton, { disabled: disabled, properties: properties, pushData: pushData })] }));
}
//# sourceMappingURL=ColorsControl.js.map