import { InjectionToken, type Provider, type Type } from '@angular/core';
import { type ClickableAnchor, type DbxInjectionComponentConfig } from '@dereekb/dbx-core';
import { type Observable } from 'rxjs';
import { type DecisionFunction, type Maybe } from '@dereekb/util';
export declare const DBX_VALUE_LIST_VIEW_ITEM: InjectionToken<unknown>;
export interface DbxValueListItem<T, M = unknown> {
    itemValue: T;
    /**
     * Arbitrary meta details available to the meta component.
     */
    meta?: M;
    icon?: string;
    disabled?: boolean;
    rippleDisabled?: boolean;
    selected?: boolean;
    anchor?: Maybe<ClickableAnchor>;
}
export type DbxValueListItemDecisionFunction<T> = DecisionFunction<DbxValueListItem<T>>;
/**
 * Convenience function for mapping a DecisionFunction for a value to a DecisionFunction for a DbxValueListItem with the same value type.
 * @param decisionFunction
 * @returns
 */
export declare function dbxValueListItemDecisionFunction<T>(decisionFunction: DecisionFunction<T>): DbxValueListItemDecisionFunction<T>;
/**
 * Special type used with values that contain all the items of DbxValueListItem internally.
 */
export type DbxValueAsListItem<T> = T & Omit<DbxValueListItem<DbxValueListItem<T>>, 'itemValue'>;
export interface AbstractDbxValueListViewConfig<T, I extends DbxValueListItem<T> = DbxValueListItem<T>, V = unknown> extends DbxInjectionComponentConfig<V> {
    mapValuesToItemValues?(values: T[]): Observable<I[]>;
    /**
     * @see DbxListViewMetaIconComponent.metaConfig()
     */
    metaConfig?: DbxInjectionComponentConfig<any>;
}
export declare const DEFAULT_DBX_VALUE_LIST_CONFIG_MAP_VALUES: <T, I extends DbxValueListItem<T>>(itemValues: T[]) => Observable<I[]>;
export type DbxValueListItemConfig<T, I extends DbxValueListItem<T> = DbxValueListItem<T>, V = unknown> = I & {
    config: DbxInjectionComponentConfig<V>;
    metaConfig?: DbxInjectionComponentConfig<any>;
};
export declare function mapValuesToValuesListItemConfigObs<T, I extends DbxValueListItem<T>, V = unknown>(listViewConfig: AbstractDbxValueListViewConfig<T, I, V>, itemValues: T[]): Observable<DbxValueListItemConfig<T, I, V>[]>;
/**
 * Adds config to the input value list items.
 *
 * @param listViewConfig
 * @param listItems
 * @returns
 */
export declare function addConfigToValueListItems<T, I extends DbxValueListItem<T>, V = unknown>(listViewConfig: AbstractDbxValueListViewConfig<T, I, V>, listItems: I[]): DbxValueListItemConfig<T, I, V>[];
export declare abstract class DbxValueListView<T, I extends DbxValueListItem<T> = DbxValueListItem<T>> {
    abstract readonly items$: Observable<I[]>;
}
export declare function provideDbxValueListView<V extends DbxValueListView<unknown>>(sourceType: Type<V>): Provider[];
