import type { QueryObserverPendingResult, QueryObserverRefetchErrorResult, QueryObserverSuccessResult, QueryObserverLoadingErrorResult, UseQueryResult } from "@tanstack/react-query";
import type { ReactNode } from "react";
type ErrorLike = {
    message: string;
};
type JSXElementOrNull = JSX.Element | null;
interface QueryCellOptionsBase<TData, TError extends ErrorLike> {
    query: UseQueryResult<TData, TError>;
    customLoader?: ReactNode;
    error?: (query: QueryObserverLoadingErrorResult<TData, TError> | QueryObserverRefetchErrorResult<TData, TError>) => JSXElementOrNull;
    loading?: (query: QueryObserverPendingResult<TData, TError> | null) => JSXElementOrNull;
}
interface QueryCellOptionsNoEmpty<TData, TError extends ErrorLike> extends QueryCellOptionsBase<TData, TError> {
    success: (query: QueryObserverSuccessResult<TData, TError>) => JSXElementOrNull;
}
interface QueryCellOptionsWithEmpty<TData, TError extends ErrorLike> extends QueryCellOptionsBase<TData, TError> {
    success: (query: QueryObserverSuccessResult<NonNullable<TData>, TError>) => JSXElementOrNull;
    /**
     * If there's no data (`null`, `undefined`, or `[]`), render this component
     */
    empty: (query: QueryObserverSuccessResult<TData, TError>) => JSXElementOrNull;
}
export declare function QueryCell<TData, TError extends ErrorLike>(opts: QueryCellOptionsWithEmpty<TData, TError>): JSXElementOrNull;
export declare function QueryCell<TData, TError extends ErrorLike>(opts: QueryCellOptionsNoEmpty<TData, TError>): JSXElementOrNull;
export {};
//# sourceMappingURL=QueryCell.d.ts.map