"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useFeatureSupportLevel = exports.FeatureSupportLevelContextProvider = void 0;
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const use_translation_wrapper_1 = require("../../hooks/use-translation-wrapper");
const FeatureSupportLevelContext = react_1.default.createContext(null);
const FeatureSupportLevelContextProvider = ({ value, children }) => {
    return (react_1.default.createElement(FeatureSupportLevelContext.Provider, { value: value }, children));
};
exports.FeatureSupportLevelContextProvider = FeatureSupportLevelContextProvider;
const useFeatureSupportLevel = () => {
    const context = react_1.default.useContext(FeatureSupportLevelContext);
    const { t } = (0, use_translation_wrapper_1.useTranslation)();
    if (!context) {
        throw new Error(t('ai:useFeatureSupportLevel must be used within FeatureSupportLevelContextProvider.'));
    }
    return context;
};
exports.useFeatureSupportLevel = useFeatureSupportLevel;
//# sourceMappingURL=FeatureSupportLevelContext.js.map