"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 useFeature_1 = __importDefault(require("./useFeature"));
const FeatureToggle = ({ featureId, fallback, children }) => {
    const feature = (0, useFeature_1.default)(featureId);
    if (!feature || !feature.enabled) {
        return react_1.default.createElement(react_1.default.Fragment, null, fallback || null);
    }
    return react_1.default.createElement(react_1.default.Fragment, null, children || null);
};
exports.default = FeatureToggle;
//# sourceMappingURL=FeatureToggle.js.map