// src/serialization/ISerializable.ts
// Interface for 5-Representation Parity
//
// Matrix components can be serialized to/from 5 equivalent representations:
// - HTML: Visual representation
// - Fluent: Builder DSL for TypeScript/JavaScript
// - S-Expr: LISP syntax
// - Topics: Matrix pub/sub structure
// - JSON: Schema definition
//
// Reference: Vision/14-HOMOICONIC-ARCHITECTURE.md (Pillars 15-16: SERIALIZE/EVAL)

// Re-export types for backward compatibility
export type { SerializationFormat } from './SerializationFormat';
export type { IComponentSchema } from './IComponentSchema';
export type { IMethodSchema } from './IMethodSchema';
export type { IEventSchema } from './IEventSchema';
export type { IParamSchema } from './IParamSchema';
export type { ISerializationOptions } from './ISerializationOptions';
export type { IParseResult } from './IParseResult';

import type { SerializationFormat } from './SerializationFormat';
import type { IComponentSchema } from './IComponentSchema';

/**
 * Interface for components that support 5-representation parity
 */
export interface ISerializable {
  /**
   * Serialize to specified format
   */
  serialize(format: SerializationFormat): string;

  /**
   * Get the canonical JSON schema
   */
  toSchema(): IComponentSchema;
}
