/**
 * Linked views over the richly-connected entity types. Each wraps a raw
 * generated record and resolves its relationships lazily against the owning
 * {@link Dataset}; the full underlying record is always available via `.raw`.
 *
 * @packageDocumentation
 */
import type { AbilityDSLEntry, Faction, Phase, Unit, WargearOption, Weapon, WeaponKeyword } from "../generated.js";
import type { Buff, BuffSource, EngineContext } from "../cruncher/buffs.js";
import { type EffectTranslation, type TranslationPerspective } from "../cruncher/from-dsl.js";
import type { Dataset } from "./dataset.js";
/** A unit, linked to its faction, weapons, and abilities. */
export declare class UnitView {
    /** The full generated `Unit` record. */
    readonly raw: Unit;
    private readonly ds;
    constructor(
    /** The full generated `Unit` record. */
    raw: Unit, ds: Dataset);
    get id(): string;
    get name(): string;
    /** The unit's faction, or `undefined` if its `faction_id` is unknown. */
    get faction(): FactionView | undefined;
    /** Weapons referenced by `weapon_ids`; unresolved ids are skipped. */
    get weapons(): WeaponView[];
    /** Abilities referenced by `ability_ids`; unresolved ids are skipped. */
    get abilities(): AbilityView[];
    /** Wargear options (weapon swaps, add-ons, choices) authored for this unit. */
    get wargearOptions(): WargearOption[];
    /**
     * The stat profile at index `i` (default 0). Returns the schema-generated
     * profile object directly so callers can feed it straight to the engine
     * without an intermediate wrapper.
     */
    profileAt(i?: number): Unit["profiles"][number];
}
/**
 * An ability, linked to the phases it acts in and the units that have it.
 *
 * Phases are not stored on the ability — they live in `phase-mappings` records.
 *
 * @example
 * units.find("Kharn")!.abilities
 *   .filter(a => a.phases.includes("shooting"));
 */
export declare class AbilityView {
    /** The full generated ability record. */
    readonly raw: AbilityDSLEntry;
    private readonly ds;
    constructor(
    /** The full generated ability record. */
    raw: AbilityDSLEntry, ds: Dataset);
    /** The ability's id (`ability_id` in the raw record). */
    get id(): string;
    get name(): string;
    /** Game phases this ability acts in, unioned across its phase-mappings. */
    get phases(): Phase[];
    /** Units that list this ability in their `ability_ids`. */
    get units(): UnitView[];
    /**
     * Buff stack this ability contributes against `context`, with provenance
     * tagged via `source` (the caller knows whether this ability is being read
     * as army, detachment, unit, leader, etc.). DSL branches the buff layer
     * can't auto-apply are dropped here; call {@link describeBuffs} if you
     * also want the diagnostics. `perspective` defaults to `"attacker"`; pass
     * `"target"` to translate the ability as a defensive buff (FNP, T/Sv
     * stat-mods, save rerolls, incoming hit penalties).
     */
    getBuffs(source: BuffSource, context?: EngineContext, perspective?: TranslationPerspective): Buff[];
    /**
     * Full DSL→Buff translation, including the `unsupported` list of effect
     * fragments the buff layer can't model. The SPA renders these as warnings
     * so users see which abilities have effects that need a manual toggle.
     */
    describeBuffs(source: BuffSource, context?: EngineContext, perspective?: TranslationPerspective): EffectTranslation;
}
/** A weapon, linked to the units that carry it. */
export declare class WeaponView {
    /** The full generated `Weapon` record. */
    readonly raw: Weapon;
    private readonly ds;
    constructor(
    /** The full generated `Weapon` record. */
    raw: Weapon, ds: Dataset);
    get id(): string;
    get name(): string;
    /** Units that list this weapon in their `weapon_ids`. */
    get units(): UnitView[];
    /** The stat profile at index `i` (default 0). */
    profileAt(i?: number): Weapon["profiles"][number];
    /**
     * Catalog views for each keyword referenced by profile `i`, paired with the
     * reference-site parameters. Unresolved keyword ids are skipped.
     */
    keywordsAt(i?: number): {
        keyword: WeaponKeywordView;
        parameters: Record<string, unknown> | undefined;
    }[];
    /**
     * Buffs contributed by profile `i`'s intrinsic keywords against `context` —
     * the natural "what does this profile bring on its own?" call the engine
     * makes automatically before adding ability/manual buffs.
     */
    profileBuffs(i: number | undefined, context: EngineContext): Buff[];
}
/**
 * A weapon-keyword catalog entry, linked to the weapons whose profiles
 * reference it. Exposes the keyword's mechanical effect as a buff stack
 * via {@link getBuffs}.
 */
export declare class WeaponKeywordView {
    /** The full generated `WeaponKeyword` record. */
    readonly raw: WeaponKeyword;
    private readonly ds;
    constructor(
    /** The full generated `WeaponKeyword` record. */
    raw: WeaponKeyword, ds: Dataset);
    get id(): string;
    get name(): string;
    /** Weapons whose profiles reference this keyword id. */
    get weapons(): WeaponView[];
    /**
     * Buff contributions from this catalog entry, for one reference site:
     * pass the keyword's `parameters` (e.g. `{ value: 1 }` for Sustained Hits 1)
     * along with the `weaponId` that's carrying it (used as the buff source)
     * and the engine `context` (e.g. attacker stationary?).
     */
    getBuffs(parameters: Record<string, unknown> | undefined, weaponId: string, context: EngineContext): Buff[];
}
/** A faction, linked to its units and the records scoped to it. */
export declare class FactionView {
    /** The full generated `Faction` record. */
    readonly raw: Faction;
    private readonly ds;
    constructor(
    /** The full generated `Faction` record. */
    raw: Faction, ds: Dataset);
    get id(): string;
    get name(): string;
    /** Units whose `faction_id` is this faction (may be empty for successors). */
    get units(): UnitView[];
    /** Faction-scoped abilities (abilities whose `faction_id` is this faction). */
    get abilities(): AbilityView[];
    /** Distinct weapons carried by this faction's units. */
    get weapons(): WeaponView[];
}
//# sourceMappingURL=entities.d.ts.map