import { Text, Rect } from '@wisemapping/web2d';
import NodeGraph, { NodeOption } from './NodeGraph';
import ConnectionLine, { LineType } from './ConnectionLine';
import ShirinkConnector from './ShrinkConnector';
import { TopicShapeType } from './model/INodeModel';
import NodeModel from './model/NodeModel';
import Relationship from './Relationship';
import Canvas from './Canvas';
import LayoutManager from './layout/LayoutManager';
import SizeType from './SizeType';
import FeatureModel from './model/FeatureModel';
import PositionType from './PositionType';
import Icon from './Icon';
import { FontStyleType } from './FontStyleType';
import { FontWeightType } from './FontWeightType';
import DragTopic from './DragTopic';
import TopicShape from './shape/TopicShape';
declare abstract class Topic extends NodeGraph {
    private _innerShape;
    private _relationships;
    private _isInWorkspace;
    private _children;
    private _parent;
    private _outerShape;
    private _text;
    private _iconsGroup;
    private _connector;
    private _outgoingLine;
    constructor(model: NodeModel, options: NodeOption);
    protected registerEvents(): void;
    setShapeType(type: TopicShapeType): void;
    getParent(): Topic | null;
    updateTopicShape(): boolean;
    getShapeType(): TopicShapeType;
    getConnectionStyle(): LineType;
    getConnectionColor(): string;
    private removeInnerShape;
    getInnerShape(): TopicShape;
    setCursor(type: string): void;
    getOuterShape(): Rect;
    getOrBuildTextShape(): Text;
    private getOrBuildIconGroup;
    private getIconGroup;
    private buildIconGroup;
    addFeature(featureModel: FeatureModel): Icon;
    findFeatureById(id: number): FeatureModel;
    removeFeature(featureModel: FeatureModel): void;
    addRelationship(relationship: Relationship): void;
    deleteRelationship(relationship: Relationship): void;
    getRelationships(): Relationship[];
    protected buildTextShape(readOnly: boolean): Text;
    setFontFamily(value: string): void;
    setFontSize(value: number): void;
    setFontStyle(value: FontStyleType): void;
    setFontWeight(value: FontWeightType): void;
    getFontWeight(): FontWeightType;
    getFontFamily(): string;
    getFontColor(): string;
    getFontStyle(): FontStyleType;
    getFontSize(): number;
    setFontColor(value: string | undefined): void;
    setText(text: string | undefined): void;
    getText(): string;
    setBackgroundColor(color: string | undefined): void;
    setConnectionStyle(type: LineType): void;
    setConnectionColor(value: string | undefined): void;
    getBackgroundColor(): string;
    setBorderColor(color: string | undefined): void;
    getBorderColor(): string;
    private buildTopicShape;
    private registerDefaultListenersToElement;
    setOnFocus(focus: boolean): void;
    areChildrenShrunken(): boolean;
    isCollapsed(): boolean;
    setChildrenShrunken(value: boolean): void;
    getShrinkConnector(): ShirinkConnector | null;
    handleMouseOver(): void;
    handleMouseOut(): void;
    showTextEditor(text: string): void;
    getNoteValue(): string | null;
    setNoteValue(value: string): void;
    getLinkValue(): string;
    setLinkValue(value: string): void;
    closeEditors(): void;
    private _getTopicEventDispatcher;
    /**
     * Point: references the center of the rect shape.!!!
     */
    setPosition(point: PositionType): void;
    getOutgoingLine(): ConnectionLine | null;
    getIncomingLines(): ConnectionLine[];
    getOutgoingConnectedTopic(): Topic | null;
    setBranchVisibility(value: boolean): void;
    setVisibility(value: boolean, fade?: number): void;
    protected moveToBack(): void;
    protected moveToFront(): void;
    isVisible(): boolean;
    private setRelationshipLinesVisibility;
    private setTopicVisibility;
    setOpacity(opacity: number): void;
    private _setChildrenVisibility;
    /** */
    invariant(): void;
    setSize(size: SizeType, force?: boolean): void;
    disconnect(workspace: Canvas): void;
    getOrder(): number | undefined;
    setOrder(value: number): void;
    connectTo(targetTopic: Topic, canvas: Canvas): void;
    private createConnectionLine;
    append(child: Topic): void;
    removeChild(child: Topic): void;
    getChildren(): Topic[];
    removeFromWorkspace(workspace: Canvas): void;
    addToWorkspace(workspace: Canvas): void;
    createDragNode(layoutManager: LayoutManager): DragTopic;
    private updateConnection;
    redraw(redrawChildren?: boolean): void;
    private flatten2DElements;
    isChildTopic(childTopic: Topic): boolean;
    abstract workoutOutgoingConnectionPoint(position: PositionType): PositionType;
    abstract workoutIncomingConnectionPoint(position: PositionType): PositionType;
    protected abstract updatePositionOnChangeSize(oldSize: SizeType, roundedSize: SizeType): void;
}
export default Topic;
