/**
 * AVL Schema Parser
 *
 * Pure functions that transform an OrbitalSchema into structured data
 * for each zoom level of the Cosmic Zoom visualization.
 *
 * Imports all types from @almadar/core.
 *
 * @packageDocumentation
 */
import type { OrbitalSchema } from '@almadar/core';
export interface ApplicationOrbitalData {
    name: string;
    entityName: string;
    fieldCount: number;
    persistence: string;
    traitNames: string[];
    pageNames: string[];
    position: {
        x: number;
        y: number;
    };
}
export interface CrossLink {
    emitterOrbital: string;
    listenerOrbital: string;
    eventName: string;
    emitterTrait: string;
    listenerTrait: string;
}
export interface ApplicationLevelData {
    orbitals: ApplicationOrbitalData[];
    crossLinks: CrossLink[];
}
export interface FieldInfo {
    name: string;
    type: string;
    required: boolean;
    hasDefault: boolean;
}
export interface OrbitalTraitInfo {
    name: string;
    stateCount: number;
    eventCount: number;
    transitionCount: number;
    emits: string[];
    listens: string[];
}
export interface OrbitalPageInfo {
    name: string;
    route: string;
}
export interface ExternalLink {
    targetOrbital: string;
    eventName: string;
    direction: 'out' | 'in';
    traitName: string;
}
export interface OrbitalLevelData {
    name: string;
    entity: {
        name: string;
        fields: FieldInfo[];
        persistence: string;
    };
    traits: OrbitalTraitInfo[];
    pages: OrbitalPageInfo[];
    externalLinks: ExternalLink[];
}
export interface TraitStateInfo {
    name: string;
    isInitial?: boolean;
    isTerminal?: boolean;
}
export interface TraitTransitionInfo {
    from: string;
    to: string;
    event: string;
    guard?: unknown;
    effects: Array<{
        type: string;
        args: unknown[];
    }>;
    index: number;
}
export interface TraitLevelData {
    name: string;
    linkedEntity: string;
    states: TraitStateInfo[];
    transitions: TraitTransitionInfo[];
    emittedEvents: string[];
    listenedEvents: string[];
}
export interface ExprTreeNode {
    label: string;
    type: 'operator' | 'literal' | 'binding';
    children?: ExprTreeNode[];
}
export interface SlotTarget {
    name: string;
    pattern: string;
}
export interface TransitionLevelData {
    from: string;
    to: string;
    event: string;
    guard: ExprTreeNode | null;
    effects: ExprTreeNode[];
    slotTargets: SlotTarget[];
}
/**
 * Parse the application-level view: all orbitals with cross-orbital links.
 */
export declare function parseApplicationLevel(schema: OrbitalSchema): ApplicationLevelData;
/**
 * Parse a single orbital's detail view.
 */
export declare function parseOrbitalLevel(schema: OrbitalSchema, orbitalName: string): OrbitalLevelData | null;
/**
 * Parse a trait's state machine for the detail view.
 */
export declare function parseTraitLevel(schema: OrbitalSchema, orbitalName: string, traitName: string): TraitLevelData | null;
/**
 * Parse a single transition for the detail view.
 */
export declare function parseTransitionLevel(schema: OrbitalSchema, orbitalName: string, traitName: string, transitionIndex: number): TransitionLevelData | null;
