import { ClientApplication } from '../../client'; import { ActionSet } from '../helper'; import { ActionSetProps, Group, MetaAction } from '../types'; import { Action, ActionType, BaseOptions, CancelPayload, ClosePayload, Options, Payload, ProductOptions, ResourceSelection, ResourceType, SelectPayload, ActionVerb } from './types'; export interface ActionBase extends MetaAction { readonly group: typeof Group.ResourcePicker; } export interface SelectAction extends ActionBase { readonly type: typeof ActionType.SELECT; readonly payload: SelectPayload; } export interface UpdateAction extends ActionBase { readonly type: typeof ActionType.UPDATE; readonly payload: Payload; } export interface CancelAction extends ActionBase { readonly type: typeof ActionType.CANCEL; } export declare type CloseAction = CancelAction; export interface OpenAction extends ActionBase { readonly type: typeof ActionType.OPEN; readonly payload: Payload; } export declare type ResourcePickerAction = SelectAction | UpdateAction | CancelAction | OpenAction | MetaAction; export declare function select(payload: SelectPayload): SelectAction; export declare function open(payload: Payload): OpenAction; export declare function cancel(payload: CancelPayload): CancelAction; export declare function close(payload: ClosePayload): CloseAction; export declare function update(payload: Payload): UpdateAction; export declare class ResourcePicker extends ActionSet implements ActionSetProps { readonly resourceType: ResourceType; initialQuery?: string; selectMultiple?: boolean; selection: ResourceSelection[]; showHidden?: boolean; showVariants?: boolean; actionVerb?: ActionVerb; constructor(app: ClientApplication, options: Options | ProductOptions, resourceType: ResourceType); readonly payload: { id: string; resourceType: ResourceType; initialQuery?: string | undefined; showHidden?: boolean | undefined; selectMultiple?: boolean | undefined; actionVerb?: ActionVerb | undefined; }; readonly options: Options; set(options: Partial, shouldUpdate?: boolean): this; dispatch(action: Action, selection?: ResourceSelection[]): this; protected update(): void; protected open(): void; protected cancel(): void; protected close(): void; } export declare const create: (app: ClientApplication, baseOptions: BaseOptions) => ResourcePicker;