import { GC } from '../../../../../@ones-table/core';
import { TypedEmitter } from 'tiny-typed-emitter';
import { CommandItem, CommandItemChildrenPlacement } from '../../types';
import { ColorPalette } from '../../color-palette';
import { StyleData } from './types';
import './style-editor.scss';
export type StyleEditorItemType = 'bold' | 'italic' | 'underline' | 'lineThrough' | 'color' | 'backgroundColor' | 'fontSize';
export interface StyleEditorOptions {
    tooltipId: string;
    items?: StyleEditorItemType[];
    preview?: boolean;
    colorPlacement?: CommandItemChildrenPlacement;
    fontSizes?: string[];
}
export interface StyleEditorEvents {
    change: (style: StyleData, editor: StyleEditor) => void;
}
export default class StyleEditor extends TypedEmitter<StyleEditorEvents> {
    private _root;
    private _toolbar;
    private _preview;
    private _style;
    private _textColorItem;
    private _backgroundColorItem;
    private _fontSizeItem;
    constructor(parent: HTMLElement, options: StyleEditorOptions);
    destroy(): void;
    handleClickItem: (bar: unknown, item: CommandItem) => void;
    handleColorChange: (type: 'color' | 'backgroundColor' | 'clearColor', value: number, sender: ColorPalette) => void;
    style(): StyleData;
    setStyle(style: StyleData): void;
    reset(): void;
    updatePreview(): void;
    setCellStyle(style: GC.Spread.Sheets.Style): void;
    toCellStyle(): GC.Spread.Sheets.Style;
}
