"use client";
import { useStigmer } from "../hooks";
import { useFetch } from "../internal/useFetch";
/**
 * Data hook that fetches the customer-facing model price list.
 *
 * Returns per-million-token prices for all billable models with
 * billing policy markup already applied, organized by harness
 * and cost tier.
 *
 * Pass `null` as `orgId` to skip fetching (stable no-op).
 * Pass `undefined` to fetch default pricing (no org override).
 *
 * @param orgId - Organization ID for org-specific overrides,
 *   `undefined` for default pricing, or `null` to skip.
 *
 * @example
 * ```tsx
 * const { pricing, isLoading } = useCustomerModelPricing(orgId);
 *
 * if (isLoading) return <Skeleton />;
 * if (!pricing) return null;
 *
 * return pricing.entries.map(entry => (
 *   <PricingRow key={entry.modelId} entry={entry} />
 * ));
 * ```
 */
export function useCustomerModelPricing(orgId) {
    const stigmer = useStigmer();
    const skip = orgId === null;
    const { data: pricing, isLoading, isRefetching, error, refetch } = useFetch(skip
        ? null
        : () => stigmer.billing.getCustomerModelPricing(orgId ? { orgId } : undefined), [orgId, stigmer], null);
    return { pricing, isLoading, isRefetching, error, refetch };
}
//# sourceMappingURL=useCustomerModelPricing.js.map