import { CommandMessageData, OnesTable, TableCommandData } from '../../../../@ones-table/common';
import { GC } from '../../../../@ones-table/core';
import { TypedEmitter } from 'tiny-typed-emitter';
import Sortable from 'sortablejs';
import RangeMasks from './range-masks';
import './rule-list.scss';
interface RuleListEvents {
    'click': (list: RuleList, rule: GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase) => void;
}
export type RuleItemsType = 'selected' | 'all';
export default class RuleList extends TypedEmitter<RuleListEvents> {
    private table;
    private parent;
    _root: HTMLElement;
    _sortable: Sortable;
    _rules: GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase[];
    _itemsType: RuleItemsType;
    _localUpdating: boolean;
    _masks: RangeMasks;
    constructor(table: OnesTable, parent: HTMLElement);
    destroy(): void;
    showRules(itemsType: RuleItemsType): void;
    getRules(): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase[];
    _createItem(rule: GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase): HTMLDivElement;
    _getRuleStyle(rule: GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase): {
        fontWeight: string;
        fontStyle: string;
        textDecoration: string;
        color: string;
        backgroundColor: string;
    };
    _setHoverItem(item: HTMLElement | null): void;
    _handleItemEnter: (event: MouseEvent) => void;
    _handleItemLeave: (event: MouseEvent) => void;
    _handleDragStart: () => void;
    _handleDragClone: (event: Sortable.SortableEvent) => void;
    _handleDragEnd: (event: Sortable.SortableEvent) => void;
    _updateSheetRules(rules: GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase[]): void;
    _handleDelete: (rule: GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase, item: HTMLElement) => void;
    _handleClick: (event: MouseEvent) => void;
    _handleRemoteCommand: (table: OnesTable, command: CommandMessageData) => void;
    _handleLocalCommand: (table: OnesTable, command: TableCommandData) => void;
    refresh(): void;
    _handleSelectionChanged: () => void;
    _handleActiveSheetChanged: () => void;
}
export {};
