import { Visibility } from "./visibility.js";
import { ReactNode } from "react";

//#region src/route/audience.d.ts
type Props = {
  visibility: Visibility;
  children: ReactNode;
  fallback?: ReactNode;
};
/**
 * Renders `children` to the visitors a rule admits, and `fallback` to the rest.
 *
 * Use it to hide parts of the tree. The UI for visibility is accessible by the
 * builder in Studio.
 *
 * Requires the root route to resolve {@link getSoftrContext}.
 *
 * @example
 * const membersOnly = defineVisibility({ userGroupTypes: ["LOGGED_IN_USERS"] })
 *
 * <Audience visibility={membersOnly} fallback={<Upgrade />}>
 *   <DangerZone />
 * </Audience>
 */
declare function Audience({
  visibility,
  children,
  fallback
}: Props): ReactNode;
//#endregion
export { Audience };