import { useAuthStore } from '../stores/auth';

export function usePermission(code: string): { hasPermission: boolean } {
  const permissions = useAuthStore((s) => s.permissions);
  return { hasPermission: permissions.includes(code) };
}
