import React from "react";
import { useI18n } from "../../../utils/i18n/i18n.hooks.js";
import { useInputContext } from "../Input/Input.context.js";
import { useSelectedOptionsContext } from "../SelectedOptions/selectedOptionsContext.js";
import filteredOptionsUtil from "./filtered-options-util.js";
const MaxSelectedMessage = () => {
    const { inputProps: { id }, } = useInputContext();
    const { maxSelected, selectedOptions } = useSelectedOptionsContext();
    const translate = useI18n("Combobox");
    return (React.createElement("div", { className: "aksel-combobox__list-item--max-selected", id: filteredOptionsUtil.getMaxSelectedOptionsId(id) }, translate("maxSelected", {
        selected: selectedOptions.length,
        limit: maxSelected.limit || 0,
    })));
};
export default MaxSelectedMessage;
//# sourceMappingURL=MaxSelectedMessage.js.map