import type { ReactNode } from "react";

type PermissionGateProps = {
  children: ReactNode;
  allowed?: boolean;
  fallback?: ReactNode;
};

export function PermissionGate({
  children,
  allowed = true,
  fallback = null,
}: PermissionGateProps) {
  return allowed ? children : fallback;
}
