import { FiltersMap, OptionalFiltersMap } from '../model';
import { CollectionConfig } from './collectionConfig';
import { CursorFetchDataFn, OffsetFetchDataFn, PaginationModeConfig } from './paginationModeConfig';
export type ItemKeyConfig<T> = T extends {
    id?: string | null;
} ? {
    itemKey?: (item: T) => string;
} : T extends {
    _id?: string | null;
} ? {
    itemKey?: (item: T) => string;
} : {
    itemKey: (item: T) => string;
};
export type ItemNameConfig<T> = T extends {
    name?: string | null;
} ? {
    itemName?: (item: T) => string;
} : {
    itemName: (item: T) => string;
};
export type FiltersConfig<F extends FiltersMap> = F extends OptionalFiltersMap ? {
    filters?: {};
} : {
    filters: F;
};
export type CollectionConfigConditionals<T, F extends FiltersMap> = FiltersConfig<F> & ItemKeyConfig<T> & ItemNameConfig<T> & PaginationModeConfig<T, F>;
export type CollectionConfigWithConditionals<T, F extends FiltersMap> = Omit<CollectionConfig<T, F>, 'itemKey' | 'itemName' | 'filters' | 'paginationMode' | 'fetchData'> & CollectionConfigConditionals<T, F>;
export type CursorCollectionConfig<T, F extends FiltersMap> = Omit<CollectionConfig<T, F>, 'itemKey' | 'itemName' | 'filters' | 'paginationMode' | 'fetchData'> & FiltersConfig<F> & ItemKeyConfig<T> & ItemNameConfig<T> & {
    fetchData: CursorFetchDataFn<T, F>;
};
export type OffsetCollectionConfig<T, F extends FiltersMap> = Omit<CollectionConfig<T, F>, 'itemKey' | 'itemName' | 'filters' | 'paginationMode' | 'fetchData'> & FiltersConfig<F> & ItemKeyConfig<T> & ItemNameConfig<T> & {
    fetchData: OffsetFetchDataFn<T, F>;
};
//# sourceMappingURL=collectionConfigPartials.d.ts.map