"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AlertTypeWizardSection = exports.renderAlertTypeSummary = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const Tabs_1 = require("../../../components/Tabs");
const getAlertType_1 = require("../Utilities/getAlertType");
const rebass_1 = require("rebass");
const TypeRadio_1 = require("../../Wizard/TypeRadio");
const Tag_1 = require("../../../components/Tag");
const renderAlertTypeSummary = (alertType) => {
    const text = (0, getAlertType_1.getAlertTypeText)(alertType);
    return (React.createElement(rebass_1.Box, null,
        React.createElement(Tag_1.Tag, null, text)));
};
exports.renderAlertTypeSummary = renderAlertTypeSummary;
const AlertTypeWizardSection = (props) => {
    return (React.createElement(Tabs_1.Tabs, null,
        React.createElement(Tabs_1.Tabs.Tab, null, "Alert Type"),
        React.createElement(Tabs_1.Tabs.Content, null,
            React.createElement(rebass_1.Flex, { flexDirection: "column" },
                React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.DataChange), description: "A change has been made to the Grid's underlying data", checked: props.alertType === getAlertType_1.AlertType.DataChange, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.DataChange) }),
                React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.RowChange), description: "A Row was added or removed from the data source", checked: props.alertType === getAlertType_1.AlertType.RowChange, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.RowChange) }),
                React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Aggregation), description: "A change has been made to aggregated data (i.e. from multiple Rows)", onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Aggregation), checked: props.alertType === getAlertType_1.AlertType.Aggregation }),
                React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Observable), description: "A specified change (or lack of change) over time has been observed in the Grid", onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Observable), checked: props.alertType === getAlertType_1.AlertType.Observable }),
                React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Validation), description: "A change has broken a data validation rule", checked: props.alertType === getAlertType_1.AlertType.Validation, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Validation) })))));
};
exports.AlertTypeWizardSection = AlertTypeWizardSection;
