/**
 * BattleBoard
 *
 * Core rendering organism for turn-based battles.
 *
 * This is a **controlled-only** component: all game state (units, phase,
 * turn, gameResult, selectedUnitId) must be provided via the `entity` prop.
 * User interactions are communicated via event bus emissions so the parent
 * (typically an Orbital trait or the `useBattleState` hook) can manage
 * state transitions.
 *
 * For a self-managing version, use `UncontrolledBattleBoard` which
 * composes this component with the `useBattleState` hook.
 *
 * Animation-only state (movement interpolation, screen shake, hover) is
 * always managed locally.
 *
 * @packageDocumentation
 */
import React from 'react';
import type { EventEmit, EntityRow } from '@almadar/core';
import type { DisplayStateProps } from '../../core/organisms/types';
import type { ResolvedFrame } from './types/spriteAnimation';
/** Battle phases an encounter walks through (UI value enum — not entity data). */
export type BattlePhase = 'observation' | 'selection' | 'movement' | 'action' | 'enemy_turn' | 'game_over';
/** Context exposed to render-prop slots. Carries coerced entity rows + UI helpers. */
export type BattleSlotContext = {
    phase: BattlePhase;
    turn: number;
    selectedUnit: EntityRow | null;
    hoveredUnit: EntityRow | null;
    playerUnits: readonly EntityRow[];
    enemyUnits: readonly EntityRow[];
    gameResult: 'victory' | 'defeat' | null;
    onEndTurn: () => void;
    onCancel: () => void;
    onReset: () => void;
    attackTargets: Array<{
        x: number;
        y: number;
    }>;
    /** Resolve screen position of a tile for overlays */
    tileToScreen: (x: number, y: number) => {
        x: number;
        y: number;
    };
};
export interface BattleBoardProps extends DisplayStateProps {
    /** Entity (single board state) containing all board data */
    entity?: EntityRow | readonly EntityRow[];
    /** Canvas render scale */
    scale?: number;
    /** Unit draw-size multiplier */
    unitScale?: number;
    /** Header area -- receives battle context */
    header?: (ctx: BattleSlotContext) => React.ReactNode;
    /** Sidebar content (combat log, unit roster, etc.) */
    sidebar?: (ctx: BattleSlotContext) => React.ReactNode;
    /** Floating action buttons */
    actions?: (ctx: BattleSlotContext) => React.ReactNode;
    /** Floating overlays above the canvas (damage popups, tooltips) */
    overlay?: (ctx: BattleSlotContext) => React.ReactNode;
    /** Game-over screen overlay */
    gameOverOverlay?: (ctx: BattleSlotContext) => React.ReactNode;
    /** Called when a unit attacks another */
    onAttack?: (attacker: EntityRow, target: EntityRow, damage: number) => void;
    /** Called when battle ends */
    onGameEnd?: (result: 'victory' | 'defeat') => void;
    /** Called after a unit moves */
    onUnitMove?: (unit: EntityRow, to: {
        x: number;
        y: number;
    }) => void;
    /** Custom combat damage calculator */
    calculateDamage?: (attacker: EntityRow, target: EntityRow) => number;
    onDrawEffects?: (ctx: CanvasRenderingContext2D, timestamp: number) => void;
    hasActiveEffects?: boolean;
    effectSpriteUrls?: string[];
    resolveUnitFrame?: (unitId: string) => ResolvedFrame | null;
    /** Emits UI:{tileClickEvent} with { x, y } on tile click */
    tileClickEvent?: EventEmit<{
        x: number;
        y: number;
    }>;
    /** Emits UI:{unitClickEvent} with { unitId } on unit click */
    unitClickEvent?: EventEmit<{
        unitId: string;
    }>;
    /** Emits UI:{endTurnEvent} with {} on end turn */
    endTurnEvent?: EventEmit<Record<string, never>>;
    /** Emits UI:{cancelEvent} with {} on cancel */
    cancelEvent?: EventEmit<Record<string, never>>;
    /** Emits UI:{gameEndEvent} with { result: 'victory' | 'defeat' } on game end */
    gameEndEvent?: EventEmit<{
        result: 'victory' | 'defeat';
    }>;
    /** Emits UI:{playAgainEvent} with {} on play again / reset */
    playAgainEvent?: EventEmit<Record<string, never>>;
    /** Emits UI:{attackEvent} with { attackerId, targetId, damage } on attack */
    attackEvent?: EventEmit<{
        attackerId: string;
        targetId: string;
        damage: number;
    }>;
    className?: string;
}
export declare function BattleBoard({ entity, scale, unitScale, header, sidebar, actions, overlay, gameOverOverlay, onAttack, onGameEnd, onUnitMove, calculateDamage, onDrawEffects, hasActiveEffects, effectSpriteUrls, resolveUnitFrame, tileClickEvent, unitClickEvent, endTurnEvent, cancelEvent, gameEndEvent, playAgainEvent, attackEvent, className, }: BattleBoardProps): React.JSX.Element;
export declare namespace BattleBoard {
    var displayName: string;
}
export default BattleBoard;
