"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectedFeatureCountContainer = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var selection_count_1 = require("../api/selection-count");
var selected_feature_count_1 = require("../components/selected-feature-count");
var hooks_1 = require("./hooks");
var SelectedFeatureCountContainer = function (props) {
    var style = props.style;
    var selection = (0, hooks_1.useActiveMapSelectionSet)();
    var clientSelection = (0, hooks_1.useActiveMapClientSelectionSet)();
    var locale = (0, hooks_1.useViewerLocale)();
    var summary = (0, selection_count_1.countSelection)(selection === null || selection === void 0 ? void 0 : selection.FeatureSet, clientSelection);
    if (summary) {
        return React.createElement(selected_feature_count_1.SelectedFeatureCount, { locale: locale, style: style, summary: summary });
    }
    else {
        return React.createElement("div", null);
    }
};
exports.SelectedFeatureCountContainer = SelectedFeatureCountContainer;
//# sourceMappingURL=selected-feature-count.js.map