import type { Disposable } from '@blockeditor/global/utils';
import { Slot } from '@blockeditor/global/utils';
import type { UniComponent } from '../../_common/components/uni-component/uni-component.js';
import type { TType } from '../logical/typesystem.js';
import type { ColumnDataUpdater, InsertToPosition } from '../types.js';
import type { FilterGroup, Variable } from './ast.js';
import type { CellRenderer, ColumnConfig, ColumnConfigManager } from './columns/manager.js';
import type { DataSource, DetailSlots } from './datasource/base.js';
export interface DataViewManager {
    get id(): string;
    get type(): string;
    get readonly(): boolean;
    get columnManagerList(): DataViewColumnManager[];
    get columns(): string[];
    get detailColumns(): string[];
    get columnsWithoutFilter(): string[];
    get rows(): string[];
    get filter(): FilterGroup;
    get filterVisible(): boolean;
    filterSetVisible(visible: boolean): void;
    get vars(): Variable[];
    updateFilter(filter: FilterGroup): void;
    cellGetValue(rowId: string, columnId: string): unknown;
    cellGetRenderValue(rowId: string, columnId: string): unknown;
    cellGetJsonValue(rowId: string, columnId: string): unknown;
    cellGetStringValue(rowId: string, columnId: string): string;
    cellGetExtra(rowId: string, columnId: string): unknown | undefined;
    cellSetValueFromString(columnId: string, value: string): {
        value: unknown;
        data?: Record<string, unknown>;
    };
    cellUpdateRenderValue(rowId: string, columnId: string, value: unknown): void;
    cellUpdateValue(rowId: string, columnId: string, value: unknown): void;
    rowDelete(ids: string[]): void;
    rowAdd(insertPosition: InsertToPosition): string;
    columnAdd(toAfterOfColumn: InsertToPosition, type?: string): string;
    columnDelete(columnId: string): void;
    columnDuplicate(columnId: string): void;
    columnGet(columnId: string): DataViewColumnManager;
    columnGetPreColumn(columnId: string): DataViewColumnManager | undefined;
    columnGetNextColumn(columnId: string): DataViewColumnManager | undefined;
    columnGetName(columnId: string): string;
    columnGetType(columnId: string): string;
    columnGetHide(columnId: string): boolean;
    columnGetData(columnId: string): Record<string, unknown>;
    columnGetDataType(columnId: string): TType;
    columnGetIndex(columnId: string): number;
    columnGetIdByIndex(index: number): string;
    columnGetReadonly(columnId: string): boolean;
    columnUpdateName(columnId: string, name: string): void;
    columnUpdateHide(columnId: string, hide: boolean): void;
    columnUpdateType(columnId: string, type: string): void;
    columnUpdateData(columnId: string, data: Record<string, unknown>): void;
    get allColumnConfig(): ColumnConfig[];
    get columnConfigManager(): ColumnConfigManager;
    getIcon(type: string): UniComponent | undefined;
    /**
     * @deprecated
     */
    captureSync(): void;
    slots: {
        update: Slot;
    };
    onCellUpdate(rowId: string, columnId: string, callback: () => void): Disposable;
    columnMove(columnId: string, position: InsertToPosition): void;
    rowMove(rowId: string, position: InsertToPosition): void;
    duplicateView(): void;
    deleteView(): void;
    get isDeleted(): boolean;
    get detailSlots(): DetailSlots;
}
export interface DataViewColumnManager<Value = unknown, Data extends Record<string, unknown> = Record<string, unknown>> {
    get dataViewManager(): DataViewManager;
    get id(): string;
    get index(): number;
    get type(): string;
    get dataType(): TType;
    get name(): string;
    get hide(): boolean;
    get data(): Data;
    get readonly(): boolean;
    get renderer(): CellRenderer;
    get detailRenderer(): CellRenderer;
    get isFirst(): boolean;
    get isLast(): boolean;
    getStringValue(rowId: string): string;
    getJsonValue(rowId: string): unknown;
    getValue(rowId: string): Value | undefined;
    getExtra(rowId: string): unknown;
    setValue(rowId: string, value: Value | undefined): void;
    updateData(updater: ColumnDataUpdater<Data>): void;
    updateHide(hide: boolean): void;
    updateName(name: string): void;
    get updateType(): undefined | ((type: string) => void);
    get delete(): undefined | (() => void);
    get duplicate(): undefined | (() => void);
    get icon(): UniComponent | undefined;
    onCellUpdate(rowId: string, callback: () => void): Disposable;
    /**
     * @deprecated
     */
    captureSync(): void;
}
export declare abstract class BaseDataViewManager implements DataViewManager {
    protected dataSource: DataSource;
    private searchString;
    private _filterVisible?;
    get rows(): string[];
    protected constructor(dataSource: DataSource);
    setSearch(str: string): void;
    abstract isShow(rowId: string): boolean;
    private filteredRows;
    get columnManagerList(): ReturnType<this['columnGet']>[];
    get readonly(): boolean;
    slots: {
        update: Slot<void>;
    };
    onCellUpdate(rowId: string, columnId: string, callback: () => void): Disposable;
    cellGetValue(rowId: string, columnId: string): unknown;
    cellGetJsonValue(rowId: string, columnId: string): unknown;
    cellGetRenderValue(rowId: string, columnId: string): unknown;
    cellGetStringValue(rowId: string, columnId: string): string;
    cellGetExtra(rowId: string, columnId: string): unknown;
    cellSetValueFromString(columnId: string, cellData: string): {
        value: unknown;
        data?: Record<string, unknown> | undefined;
    };
    cellUpdateRenderValue(rowId: string, columnId: string, value: unknown): void;
    cellUpdateValue(rowId: string, columnId: string, value: unknown): void;
    columnAdd(position: InsertToPosition, type?: string): string;
    columnDelete(columnId: string): void;
    columnDuplicate(columnId: string): void;
    abstract columnGet(columnId: string): DataViewColumnManager;
    columnGetData(columnId: string): Record<string, unknown>;
    columnGetDataType(columnId: string): TType;
    abstract columnGetHide(columnId: string): boolean;
    abstract columnUpdateHide(columnId: string, hide: boolean): void;
    columnGetIdByIndex(index: number): string;
    columnGetReadonly(columnId: string): boolean;
    columnGetIndex(columnId: string): number;
    columnGetName(columnId: string): string;
    columnGetNextColumn(columnId: string): DataViewColumnManager | undefined;
    columnGetPreColumn(columnId: string): DataViewColumnManager | undefined;
    columnGetType(columnId: string): string;
    columnUpdateData(columnId: string, data: Record<string, unknown>): void;
    columnUpdateName(columnId: string, name: string): void;
    columnUpdateType(columnId: string, type: string): void;
    abstract get columns(): string[];
    abstract get detailColumns(): string[];
    abstract get columnsWithoutFilter(): string[];
    rowAdd(insertPosition: InsertToPosition | number): string;
    rowDelete(ids: string[]): void;
    captureSync(): void;
    abstract get id(): string;
    abstract get type(): string;
    get allColumnConfig(): ColumnConfig[];
    get columnConfigManager(): ColumnConfigManager;
    getIcon(type: string): UniComponent | undefined;
    abstract columnMove(columnId: string, position: InsertToPosition): void;
    abstract deleteView(): void;
    abstract get isDeleted(): boolean;
    get detailSlots(): DetailSlots;
    abstract get filter(): FilterGroup;
    abstract updateFilter(filter: FilterGroup): void;
    get vars(): Variable[];
    filterSetVisible(visible: boolean): void;
    get filterVisible(): boolean;
    rowMove(rowId: string, position: InsertToPosition): void;
    abstract duplicateView(): void;
}
export declare abstract class BaseDataViewColumnManager implements DataViewColumnManager {
    protected propertyId: string;
    dataViewManager: DataViewManager;
    protected constructor(propertyId: string, dataViewManager: DataViewManager);
    get index(): number;
    get data(): Record<string, unknown>;
    get hide(): boolean;
    get id(): string;
    get isFirst(): boolean;
    get isLast(): boolean;
    get name(): string;
    get renderer(): CellRenderer;
    get detailRenderer(): CellRenderer;
    get type(): string;
    get dataType(): TType;
    getValue(rowId: string): unknown | undefined;
    getExtra(rowId: string): unknown;
    setValue(rowId: string, value: unknown | undefined): void;
    updateData(updater: ColumnDataUpdater): void;
    updateHide(hide: boolean): void;
    updateName(name: string): void;
    get delete(): (() => void) | undefined;
    get duplicate(): (() => void) | undefined;
    get updateType(): undefined | ((type: string) => void);
    get readonly(): boolean;
    captureSync(): void;
    getJsonValue(rowId: string): unknown;
    getStringValue(rowId: string): string;
    setValueFromString(value: string): unknown;
    get icon(): UniComponent | undefined;
    onCellUpdate(rowId: string, callback: () => void): Disposable;
}
//# sourceMappingURL=data-view-manager.d.ts.map