import { RegistryInterface } from '@subscan/widget-runtime';
import { ComponentSchema, MethodSchema, RuntimeComponent, SlotSpec } from '@subscan/widget-core';
import { ComponentId, ComponentType, IAppModel, IComponentModel, SlotName, StyleSlotName, ITraitModel, IFieldModel, EventName, TraitType, TraitId, MethodName } from './IAppModel';
declare type ComponentSpecModel = RuntimeComponent<any, any, Record<MethodName, MethodSchema['parameters']>, ReadonlyArray<StyleSlotName>, Record<SlotName, SlotSpec>, ReadonlyArray<EventName>>;
export declare class ComponentModel implements IComponentModel {
    private schema;
    private registry;
    appModel: IAppModel;
    spec: ComponentSpecModel;
    id: ComponentId;
    type: ComponentType;
    properties: IFieldModel;
    children: Record<SlotName, IComponentModel[]>;
    parent: IComponentModel | null;
    parentId: ComponentId | null;
    parentSlot: SlotName | null;
    traits: ITraitModel[];
    stateExample: Record<string, any>;
    _isDirty: boolean;
    constructor(schema: ComponentSchema, registry: RegistryInterface, appModel: IAppModel);
    get slots(): SlotName[];
    get events(): EventName[];
    get methods(): MethodSchema[];
    get styleSlots(): StyleSlotName[];
    get rawProperties(): any;
    get prevSibling(): IComponentModel | null;
    get nextSibling(): IComponentModel | null;
    get _slotTrait(): ITraitModel | null;
    get allComponents(): IComponentModel[];
    toSchema(): ComponentSchema;
    updateComponentProperty(propertyName: string, value: any): void;
    addTrait(traitType: TraitType, properties: Record<string, unknown>): ITraitModel;
    appendTo: (parent?: IComponentModel | undefined, slot?: SlotName | undefined) => void;
    removeChild(child: IComponentModel): void;
    removeTrait(traitId: TraitId): void;
    changeId(newId: ComponentId): this;
    moveAfter(after: IComponentModel | null): this;
    appendChild(child: IComponentModel, slot: SlotName): void;
    updateTraitProperties(traitId: TraitId, properties: Record<string, unknown>): void;
    updateSlotTrait(parent: ComponentId, slot: SlotName): void;
    private traverseTree;
    private genStateExample;
}
export {};
