import { DataSourceChange } from '../../../../utils/data-source/data-source.types';
import { EditType, RowData } from '../../table.types';
export interface EditingController {
    onCreateStart(): Promise<RowData>;
    onCreateEnd(event: CustomEvent): Promise<RowData>;
    onDelete(event: CustomEvent): Promise<[RowData, number]>;
    onUpdateCancel(): void;
    onUpdateStart(event: CustomEvent): Promise<[number, RowData]>;
    onUpdateEnd(event: CustomEvent): Promise<[RowData, RowData, number] | undefined>;
    getEditType(data: RowData): EditType;
    undo(change: DataSourceChange): Promise<void>;
    save(): Promise<DataSourceChange | void>;
    validate(el: HTMLElement): Promise<boolean>;
}
export declare abstract class BaseEditingController implements EditingController {
    protected control: HTMLAnjEditingElement;
    protected table: HTMLAnjTableElement;
    private static isDirty;
    protected constructor(control: HTMLAnjEditingElement, table: HTMLAnjTableElement);
    abstract getEditType(data: RowData): EditType;
    abstract save(): Promise<DataSourceChange | void>;
    abstract undo(change: DataSourceChange): Promise<void>;
    onCreateStart(): Promise<RowData>;
    onCreateEnd({ target }: CustomEvent): Promise<RowData>;
    onDelete({ target }: CustomEvent): Promise<[RowData, number]>;
    onUpdateStart(event: CustomEvent): Promise<[number, RowData]>;
    onUpdateEnd({ target }: CustomEvent): Promise<[RowData, RowData, number] | undefined>;
    onUpdateCancel(): void;
    validate(el: HTMLElement): Promise<boolean>;
    protected getData(target: HTMLElement): RowData;
    protected indexByElement(target: HTMLElement): number;
}
