// src/core/composite/IAddChildOptions.ts

import type { Position } from './Position';

/**
 * Options for addChild operation.
 */
export interface IAddChildOptions {
  /** Target slot name (default: 'default') */
  slot?: string;
  /** Position within slot (default: 'append') */
  position?: Position;
  /** Initial properties to set on child */
  props?: Record<string, unknown>;
  /** Shell tag for dynamic children (used by browser runtime) */
  shellTag?: string;
  /**
   * Declarative event bindings: { eventName: 'handlerMethodName' }
   *
   * Example:
   * ```typescript
   * await composite.addChild('counter', Counter, {
   *   bindings: {
   *     'incremented': 'handleIncrement',
   *     'valueChanged': 'onValueUpdate'
   *   }
   * });
   * ```
   *
   * This is equivalent to CompositeElement's `onEvent="handler"` attribute
   * but works for headless components.
   */
  bindings?: Record<string, string>;
}
