"use client";
import { useCallback } from "react";
import { useStigmer } from "../hooks";
import { useResourceCount } from "../search";
/**
 * Data hook that fetches the total count of skills.
 *
 * Issues a minimal `stigmer.skill.list()` call to retrieve only the
 * total count — no skill entries are returned or stored. Useful for
 * summary cards, badges, and dashboard widgets.
 *
 * For the full paginated skill list, use {@link useSkillList} instead.
 *
 * Pass `null` as `org` to skip fetching (stable no-op).
 *
 * @example
 * ```tsx
 * const { count, isLoading } = useSkillCount("acme");
 * ```
 *
 * @example
 * ```tsx
 * // Count all accessible skills including public/platform ones
 * const { count } = useSkillCount("acme", { scope: "all" });
 * ```
 */
export function useSkillCount(org, options) {
    const stigmer = useStigmer();
    const listFn = useCallback((params) => stigmer.skill.list(params), [stigmer]);
    return useResourceCount(listFn, org, options);
}
//# sourceMappingURL=useSkillCount.js.map