import { useAuthStore } from "../stores/auth.js";

export function usePermission() {
  const authStore = useAuthStore();

  return {
    has: (slug) => authStore.hasPermission(slug),
    hasAny: (slugs) => authStore.hasAnyPermission(slugs),
    permissions: authStore.permissions,
  };
}
