import type { ComponentSnapshot, EventHandler } from "./types.js"; import { type LayerNode } from "./layers.js"; export declare class ComponentState { readonly id: string; private _registry?; private _layers; private _attr; private _data; private _dataSchema?; private bus; constructor(initial: ComponentSnapshot); getSnapshot(): ComponentSnapshot; get layers(): { list(): string | any[]; /** Get the internal tree (useful for debugging) */ tree(): LayerNode[]; set(layers: string | any[]): void; append(parentSemanticId: string, layer: string): void; prepend(parentSemanticId: string, layer: string): void; before(targetSemanticId: string, layer: string): void; after(targetSemanticId: string, layer: string): void; wrap(targetSemanticId: string, wrapperLayer: string): void; unwrap(targetSemanticId: string): void; move(sourceSemanticId: string, targetSemanticId: string, position?: "before" | "after" | "inside"): void; remove(semanticId: string): void; update(semanticId: string, patch: { tag?: string; semanticId?: string; repeator?: string | null; }): void; }; get attr(): { list(): Record; get(semanticId: string): Record | undefined; set(semanticId: string, attrs: Record): void; update(semanticId: string, patch: Record): void; remove(semanticId: string, attrKey?: string): void; }; get data(): { get(path?: string): any; set(path: string, value: any): void; update(path: string, patch: Record): void; remove(path: string): void; }; get variant(): { get(semanticId?: string): string | undefined; set(variantName: string, semanticId?: string): void; }; get registry(): { get(): Record | undefined; set(registry: Record): void; update(patch: Record): void; addRule(rule: { selector: string; media?: string; css: Record; }): void; removeRule(selector: string): void; }; on(event: string, handler: EventHandler): () => void; off(event: string, handler: EventHandler): void; private emit; }