"use client";

import { useAccess } from "../hooks/use-access";

export function AccessAction({ ability, allowed = true, children }: { ability: string; allowed?: boolean; children: React.ReactNode }) {
  const { can } = useAccess();
  return allowed && can(ability) ? children : null;
}
