import { Sortable, SortableConfig } from '.';
import { MaybeRefOrGetter } from 'vue';
export type ResourceCollectionConfig<T extends {
    id: string;
}> = SortableConfig<T> & {
    routeName: string;
    endpoint: string;
    itemsPerPage?: number;
    params?: MaybeRefOrGetter<Record<string, any>>;
    onFetched?: VoidFunction;
};
export type ResourceCollection<T extends {
    id: string;
}> = {
    renderKey: symbol;
    abortController: AbortController | undefined;
    collection: T[];
    isLoading: boolean;
    sortable: Sortable<T>;
    isEmpty: boolean;
    firstItem: T | undefined;
    lastItem: T | undefined;
    refresh: () => void;
};
export type PaginatedResourceCollection<T extends {
    id: string;
}> = ResourceCollection<T> & {
    total: number;
    currentPage: number;
    totalPages: number;
};
export declare function useResourceCollection<T extends {
    id: string;
}>(cfg: ResourceCollectionConfig<T> & {
    itemsPerPage: number;
}): PaginatedResourceCollection<T>;
export declare function useResourceCollection<T extends {
    id: string;
}>(cfg: ResourceCollectionConfig<T>): ResourceCollection<T>;
