"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.renderObjectTagsSummary = exports.ObjectTagsWizardSection = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const Tabs_1 = require("../../components/Tabs");
const TagValueSelector_1 = require("../Components/TagValueSelector");
const OnePageAdaptableWizard_1 = require("./OnePageAdaptableWizard");
const rebass_1 = require("rebass");
const ObjectTagsWizardSection = (props) => {
    const { onChange } = props;
    const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
    return (React.createElement(Tabs_1.Tabs, { style: { height: '100%' } },
        React.createElement(Tabs_1.Tabs.Tab, null, "Tags"),
        React.createElement(Tabs_1.Tabs.Content, null,
            React.createElement(TagValueSelector_1.TagValueSelector, { selectedTags: data.Tags, onChange: (selectedTags) => onChange({ ...data, Tags: selectedTags }) }))));
};
exports.ObjectTagsWizardSection = ObjectTagsWizardSection;
const renderObjectTagsSummary = (data) => {
    return data.Tags?.length ? (React.createElement(rebass_1.Text, { fontSize: 2 },
        React.createElement(TagValueSelector_1.TagValueOptionsTags, { tags: data.Tags }))) : null;
};
exports.renderObjectTagsSummary = renderObjectTagsSummary;
