"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeleteChartButton = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const ButtonDelete_1 = require("../Components/Buttons/ButtonDelete");
const ChartingRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ChartingRedux"));
const ChartingState_1 = require("../../AdaptableState/ChartingState");
const DeleteChartButton = (props) => {
    return (React.createElement(ButtonDelete_1.ButtonDelete, { iconSize: props.iconSize, disabled: !props.chart, ConfirmAction: (0, ChartingState_1.isAgChartDefinition)(props.chart)
            ? ChartingRedux.ChartingDeleteChart(props.chart)
            : ChartingRedux.ChartingDeleteExternalChart(props.chart), ConfirmationMsg: `Are you sure you want to delete this Charts?`, ConfirmationTitle: 'Delete Charts', accessLevel: props.accessLevel, tooltip: "Delete Chart" }));
};
exports.DeleteChartButton = DeleteChartButton;
