import type { ReactNode } from 'react';
import type { SiteId } from '@riverbankcms/core';
import type { ReferenceKind } from '@riverbankcms/content-model';
import type { PickerLabels, PickerOption, PickerOptionBadgeVariant, PickerSelectionLabelArgs } from '@riverbankcms/ui';
export type ReferenceWidgetItemBadgeVariant = PickerOptionBadgeVariant;
export type ReferenceWidgetItem = PickerOption;
export type ReferenceWidgetAdapterArgs = Readonly<{
    siteId: SiteId;
    kind: ReferenceKind;
}>;
export type ReferenceWidgetSelectionLabelArgs = PickerSelectionLabelArgs<ReferenceWidgetItem>;
export type ReferenceWidgetAdapterLabels = PickerLabels;
export type ReferenceWidgetAdapter = {
    loadItems: (args: ReferenceWidgetAdapterArgs) => Promise<readonly ReferenceWidgetItem[]>;
    renderManageLink?: (args: ReferenceWidgetAdapterArgs) => ReactNode;
    formatSelectionLabel?: (args: Readonly<{
        value: string;
        items: readonly ReferenceWidgetItem[];
    }>) => string;
    labels?: ReferenceWidgetAdapterLabels;
};
export type ReferenceWidgetAdapters = Record<string, ReferenceWidgetAdapter>;
export type CreateReferenceWidgetOptions = {
    siteId?: SiteId;
    adapters?: ReferenceWidgetAdapters;
};
