"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const i18n_hooks_1 = require("../../../utils/i18n/i18n.hooks");
const Input_context_1 = require("../Input/Input.context");
const selectedOptionsContext_1 = require("../SelectedOptions/selectedOptionsContext");
const filtered_options_util_1 = __importDefault(require("./filtered-options-util"));
const MaxSelectedMessage = () => {
    const { inputProps: { id }, } = (0, Input_context_1.useInputContext)();
    const { maxSelected, selectedOptions } = (0, selectedOptionsContext_1.useSelectedOptionsContext)();
    const translate = (0, i18n_hooks_1.useI18n)("Combobox");
    return (react_1.default.createElement("div", { className: "aksel-combobox__list-item--max-selected", id: filtered_options_util_1.default.getMaxSelectedOptionsId(id) }, translate("maxSelected", {
        selected: selectedOptions.length,
        limit: maxSelected.limit || 0,
    })));
};
exports.default = MaxSelectedMessage;
//# sourceMappingURL=MaxSelectedMessage.js.map