import { AABB, BaseStyleProps, DisplayObject, DisplayObjectConfig, Group } from '@antv/g';
import type { CollapsedMarkerStyleProps, Combo, ID, NodeLikeData, Padding, Point, Prefix, STDSize, Size } from '../../types';
import type { BaseNodeStyleProps } from '../nodes';
import { BaseNode } from '../nodes';
import { IconStyleProps } from '../shapes';
/**
* 组合通用样式配置项
*
* Common style props for combo
*/
export interface BaseComboStyleProps extends BaseNodeStyleProps, Prefix<'collapsed', BaseStyleProps>, Prefix<'collapsedMarker', CollapsedMarkerStyleProps> {
/**
* 组合展开后的默认大小
*
* The default size of combo when expanded
*/
size?: Size;
/**
* 组合收起后的默认大小
*
* The default size of combo when collapsed
*/
collapsedSize?: Size;
/**
* 组合的子元素,可以是节点或者组合
*
* The children of combo, which can be nodes or combos
*/
childrenNode?: ID[];
/**
* 组合的子元素数据
*
* The data of the children of combo
* @remarks
* 如果组合是收起状态,children 可能为空,通过 childrenData 能够获取完整的子元素数据
*
* If the combo is collapsed, children may be empty, and the complete child element data can be obtained through childrenData
*/
childrenData?: NodeLikeData[];
/**
* 组合的内边距,只在展开状态下生效
*
* The padding of combo, only effective when expanded
*/
padding?: Padding;
/**
* 组合收起时是否显示标记
*
* Whether to show the marker when the combo is collapsed
*/
collapsedMarker?: boolean;
}
/**
* 组合元素的基类
*
* Base class of combo
* @remarks
* 自定义组合时,推荐使用这个类作为基类。这样,用户只需要专注于实现 keyShape 的绘制逻辑
*
* When customizing a combo, it is recommended to use this class as the base class. In this way, users only need to focus on the logic of drawing keyShape
*/
export declare abstract class BaseCombo extends BaseNode implements Combo {
type: string;
static defaultStyleProps: Partial;
constructor(options: DisplayObjectConfig);
/**
* Draw the key shape of combo
*/
protected abstract drawKeyShape(attributes: Required, container: Group): DisplayObject | undefined;
protected getKeySize(attributes: Required): STDSize;
protected getEmptyKeySize(attributes: Required): STDSize;
protected getCollapsedKeySize(attributes: Required): STDSize;
protected getExpandedKeySize(attributes: Required): STDSize;
protected getContentBBox(attributes: Required): AABB;
protected drawCollapsedMarkerShape(attributes: Required, container: Group): void;
protected getCollapsedMarkerStyle(attributes: Required): IconStyleProps | false;
protected getCollapsedMarkerText(type: CollapsedMarkerStyleProps['type'], attributes: Required): string;
getComboPosition(attributes: Required): Point;
protected getComboStyle(attributes: Required): {
x: number;
y: number;
transform: (string | number)[][];
};
protected updateComboPosition(attributes: Required): void;
render(attributes: Required, container?: Group): void;
update(attr?: Partial): void;
protected onframe(): void;
animate(keyframes: Keyframe[], options?: number | KeyframeAnimationOptions): import("@antv/g").IAnimation | null;
}