import type { ReactNode } from 'react';
import { usePermission } from '../hooks/usePermission';

interface AuthButtonProps {
  code: string;
  children: ReactNode;
}

export function AuthButton({ code, children }: AuthButtonProps) {
  const { hasPermission } = usePermission(code);
  if (!hasPermission) return null;
  return <>{children}</>;
}
