import type { BaseCellValue as CellValue, FieldType, IDisposable, ProjectedField, Rect } from '@univerjs/core';
import type { ComponentType } from 'react';
import type { CanvasDrawCommand } from '../render/canvas-draw-command';
export interface IFieldCellRenderContext<TValue extends CellValue = CellValue, TConfig = unknown> {
    value: TValue | null;
    config: TConfig;
    commands?: CanvasDrawCommand[];
    field?: ProjectedField;
    rect?: Rect;
    selected?: boolean;
    hovered?: boolean;
    linkActionHovered?: boolean;
    selectOptionRemoveHoverValue?: string | null;
    selectDropdownCenterY?: number;
}
export interface IFieldCardRenderContext<TValue extends CellValue = CellValue, TConfig = unknown> extends IFieldCellRenderContext<TValue, TConfig> {
}
export interface IFieldEditor<TValue extends CellValue = CellValue> extends IDisposable {
    readonly fieldType: string;
    getValue(): TValue | null;
    setValue(value: unknown): void;
    commit(): void;
    cancel(): void;
}
export interface IFieldEditorContext<TValue extends CellValue = CellValue, TConfig = unknown> extends IFieldCellRenderContext<TValue, TConfig> {
    commit(value: TValue | null): void;
}
export interface IFieldConfigPanelContext<TConfig = unknown> {
    config: TConfig;
    update(config: TConfig): void;
}
export interface IFieldUIPlugin<TValue extends CellValue = CellValue, TConfig = unknown> {
    type: FieldType;
    icon: ComponentType;
    renderCell(ctx: IFieldCellRenderContext<TValue, TConfig>): void;
    renderCardItem(ctx: IFieldCardRenderContext<TValue, TConfig>): void;
    renderGanttCell(ctx: IFieldCellRenderContext<TValue, TConfig>): void;
    createEditor(ctx: IFieldEditorContext<TValue, TConfig>): IFieldEditor<TValue>;
    createConfigPanel(ctx: IFieldConfigPanelContext<TConfig>): ComponentType;
}
export declare const BASE_SELECT_CELL_MAX_EXPANDED_HEIGHT = 120;
export declare function clearBaseFormulaFormatCache(): void;
export declare function getBaseFormulaFormatCacheSize(): number;
export interface IBaseProgressCellLayout {
    trackX: number;
    trackY: number;
    trackWidth: number;
    trackHeight: number;
    fillWidth: number;
    labelX: number;
    labelWidth: number;
    label: string;
    rawValue: number;
    start: number;
    end: number;
}
export interface IBaseProgressCellLayoutOptions {
    maxTrackWidth?: number;
    maxLabelWidth?: number;
    minLabelWidth?: number;
}
export declare const BASE_FIELD_UI_TYPES: FieldType[];
export declare function createCoreFieldUIPlugins(): IFieldUIPlugin[];
export declare function getCoreFieldUIPlugin(type: FieldType): IFieldUIPlugin;
export declare function getBaseLinkTextWidth(text: string): number;
export declare function getBaseProgressCellLayout(value: unknown, config: unknown, rect: Rect, options?: IBaseProgressCellLayoutOptions): IBaseProgressCellLayout;
