"use client";
import { useCallback } from "react";
import { useStigmer } from "../hooks";
import { useResourceSearch, } from "../search";
/**
 * Data hook that searches skills available in the given organization.
 *
 * Wraps `stigmer.skill.list()` with debounced search, loading/error
 * tracking, and cancellation-safe fetching. Platform builders use this
 * when they want full control over rendering; the {@link SkillPicker}
 * styled component uses it internally.
 *
 * @example
 * ```tsx
 * const { results, isLoading, query, setQuery } = useSkillSearch("acme");
 * ```
 */
export function useSkillSearch(org, options) {
    const stigmer = useStigmer();
    const listFn = useCallback((params) => stigmer.skill.list(params), [stigmer]);
    return useResourceSearch(listFn, org, options);
}
//# sourceMappingURL=useSkillSearch.js.map