"use client";
import { Fragment, jsx } from "react/jsx-runtime";
import { useFeatureFlagBoolean } from "./hooks/useFeatureFlagBoolean.js";
function FeatureGuard({
  id,
  children,
  fallback = null,
  loadingFallback = null
}) {
  const { enabled, isLoading } = useFeatureFlagBoolean({ id });
  if (isLoading) {
    return /* @__PURE__ */ jsx(Fragment, { children: loadingFallback });
  }
  if (!enabled) {
    return /* @__PURE__ */ jsx(Fragment, { children: fallback });
  }
  return /* @__PURE__ */ jsx(Fragment, { children });
}
export {
  FeatureGuard
};
//# sourceMappingURL=FeatureGuard.js.map
