import type { TicketData } from '../types';
export interface UseTicketsListFilters {
    /** Customer email — the identity the parent already resolved via
     *  `useChatIdentity` at the gate. THIS hook does NOT call
     *  `useChatIdentity` itself: `useChatIdentity` is plain
     *  `useState`+`useEffect` (no shared cache), so calling it again
     *  here would mount with `user = null` racing the parent's already-
     *  resolved identity. On the first render of `HelpCenterListAuthed`
     *  that race produced `enabled = false` for one frame, the
     *  conditional fell through to `!hasResults` → EmptyState flashed
     *  before the tickets fetch fired. Drilling `customerEmail` in
     *  from the parent makes the loading state monotonic. */
    customerEmail: string;
    /** Free-text query — server runs FTS on `search_vector`. Empty → no
     *  search filter (self-scoped "list all my tickets"). */
    search?: string;
    /** Canonical 'open' | 'closed'. Server maps to the underlying mirror
     *  status column. Empty / 'all' → no status filter. */
    status?: string;
    /** 1-based page number. Defaults to 1. */
    page?: number;
    /** Items per page (server caps at 100). Defaults to 20. */
    pageSize?: number;
}
export interface UseTicketsListReturn {
    tickets: TicketData[];
    isLoading: boolean;
    isFetching: boolean;
    error: Error | null;
    refetch: () => void;
    /** Wall-clock timestamp of the last successful fetch; null while
     *  loading the first time. */
    lastUpdatedAt: number | null;
    /** Total ticket count across all pages (NOT just the current page).
     *  Drives the `<UnifiedPagination>` total-pages calculation. */
    totalCount: number;
    /** 1-based current page (echoed from the server response so the URL
     *  and the rendered set always agree). */
    page: number;
    /** Page size in use — echoed from the server (capped at 100). */
    pageSize: number;
    /** Pre-computed `Math.ceil(totalCount / pageSize)` clamped to ≥1 so
     *  the pagination renders "1 / 1" instead of "1 / 0" on empty
     *  result sets. */
    totalPages: number;
}
export declare function useTicketsList(filters: UseTicketsListFilters): UseTicketsListReturn;
//# sourceMappingURL=use-tickets-list.d.ts.map