import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
import cx from "classnames";
import { FormattedMessage } from "react-intl";
import { VisualizationTypes } from "@gooddata/sdk-ui";
import { Bubble, BubbleHoverTrigger } from "@gooddata/sdk-ui-kit";
import { ConfigurationPanelContent } from "./ConfigurationPanelContent.js";
import { messages } from "../../../locales.js";
import { BUBBLE_ARROW_OFFSET_X, BUBBLE_ARROW_OFFSET_Y, HIDE_DELAY_DEFAULT, SHOW_DELAY_DEFAULT, } from "../../constants/bubble.js";
import { ConfigSection } from "../configurationControls/ConfigSection.js";
import { DataLabelsControl } from "../configurationControls/DataLabelsControl.js";
import { LegendSection } from "../configurationControls/legend/LegendSection.js";
export class SankeyChartConfigurationPanel extends ConfigurationPanelContent {
    renderConfigurationPanel() {
        const bubbleClassNames = cx("bubble-primary", { invisible: !this.isControlDisabled() });
        return (_jsxs(BubbleHoverTrigger, { showDelay: SHOW_DELAY_DEFAULT, hideDelay: HIDE_DELAY_DEFAULT, children: [_jsxs("div", { children: [this.renderColorSection(), this.renderLegendSection(), this.renderInteractionsSection(), this.renderCanvasSection(), this.renderAdvancedSection()] }), _jsx(Bubble, { className: bubbleClassNames, arrowOffsets: { "tc bc": [BUBBLE_ARROW_OFFSET_X, BUBBLE_ARROW_OFFSET_Y] }, alignPoints: [{ align: "tc bc" }], children: _jsx(FormattedMessage, { id: "properties.config.not_applicable" }) })] }));
    }
    renderCanvasSection() {
        const { propertiesMeta, properties, pushData } = this.props;
        const controlsDisabled = this.isControlDisabled();
        return (_jsx(ConfigSection, { id: "canvas_section", title: messages["canvasTitle"].id, propertiesMeta: propertiesMeta, properties: properties, pushData: pushData, children: _jsx(DataLabelsControl, { pushData: pushData, properties: properties, isDisabled: controlsDisabled, enableStyleSelector: this.props.type !== VisualizationTypes.DEPENDENCY_WHEEL }) }));
    }
    renderLegendSection() {
        const { properties, propertiesMeta, pushData } = this.props;
        const controlsDisabled = this.isControlDisabled();
        return (_jsx(LegendSection, { properties: properties, propertiesMeta: propertiesMeta, controlsDisabled: controlsDisabled, defaultLegendEnabled: false, pushData: pushData }));
    }
}
//# sourceMappingURL=SankeyChartConfigurationPanel.js.map