//! FAC1-1 / FAC1-2 — verify the prelude brings required symbols into scope.
//!
//! This file has NO game logic. Each `let _: Option<T> = None` line is a
//! compile-time proof that the type is reachable via `maat::prelude::*`.
//! The test function itself is trivially passing.

use maat_vtt::prelude::*;

#[test]
fn prelude_types_in_scope() {
    // Core identifiers
    let _: Option<EntityId>     = None;
    let _: Option<EntityTypeId> = None;
    let _: Option<SeatId>       = None;
    let _: Option<PlayerId>     = None;
    let _: Option<TeamId>       = None;
    let _: Option<CombatId>     = None;
    let _: Option<PoolId>       = None;
    let _: Option<PhaseId>      = None;
    let _: Option<TagSet>       = None;

    // Board / position
    let _: Option<Position> = None;
    let _: Option<FaceId>   = None;
    let _: Option<BoardNodeId>   = None;
    let _: Option<EdgeId>   = None;

    // Events and pipeline
    let _: Option<GameEvent>      = None;
    let _: Option<EventKind>      = None;
    let _: Option<ProposeResult>  = None;
    let _: Option<Decision>       = None;
    let _: Option<HandlerResponse>= None;
    let _: Option<PipelineRole>   = None;
    let _: Option<Priority>       = None;

    // Trait data
    let _: Option<TraitSet>       = None;
    let _: Option<FeaturedData>   = None;
    let _: Option<TangibleData>   = None;
    let _: Option<OwnableData>    = None;
    let _: Option<QuantifiedData> = None;
    let _: Option<ActivatableData>= None;
    let _: Option<NamedData>      = None;
    let _: Option<AttachedData>   = None;
    let _: Option<GatedData>      = None;
    let _: Option<ResourcePool>   = None;
    let _: Option<PoolType>       = None;
    let _: Option<PoolDisplay>    = None;
    let _: Option<Owner>          = None;

    // Phase system
    let _: Option<PhaseDescriptor> = None;
    let _: Option<PhaseNext>       = None;
    let _: Option<ActivePlayers>   = None;
    let _: Option<TurnsPerActor>   = None;
    let _: Option<TurnCompletion>  = None;
    let _: Option<TurnOrder>       = None;

    // Blueprint
    let _: Option<EntityBlueprint> = None;

    // entity_type_id_for is a const fn; check it compiles
    const _CHECK: EntityTypeId =
        entity_type_id_for("maat:test", "CheckEntity");
}

#[test]
fn sub_module_access() {
    // maat_vtt::types re-exports maat_sdk_types
    let _: Option<maat_vtt::types::types::EntityId> = None;

    // maat_vtt::traits re-exports maat_sdk
    fn _accepts_model_plugin(_: &dyn maat_vtt::traits::ModelPlugin) {}
}

// ---------------------------------------------------------------------------
// FA1 phase 2: post-WI1-7 prelude shape invariants.
//
// WI1-7 retired the imperative `#[wizard]` plugin surface. The following
// symbols MUST NOT be reachable via `maat::prelude::*` — they were
// either deleted entirely or moved to engine-internal modules.
// ---------------------------------------------------------------------------

/// `Wizard<'_>` was the SD1-B.7 plugin cursor wrapper. Deleted in WI1-7
/// phase 1. Plugins now declare wizards via `register_wizard_spec` and
/// the engine's `composition_wizard` drives the lifecycle.
///
/// `WizardAction` / `WizardResponse` were the engine <-> plugin
/// dispatch types. Renamed `ComposerAction` / `ComposerResponse` in
/// WI1-7 phase 2 and moved to `maat_engine::composer` in phase 3
/// (engine-internal, no plugin reaches them).
///
/// `WizardRegistration` / `WizardThunk` / `REGISTERED_WIZARDS` /
/// `WizardDeclaration` were the linkme-distributed `#[wizard]` macro
/// surface. Deleted wholesale.
///
/// `LocalWizardId` indexed into the plugin's wizard dispatch table.
/// Deleted along with the dispatch table.
///
/// `WizardKind` STAYS plugins still emit
/// `Decision::Wizard(StagedDecision::new(_, kind, _))` from Filter
/// handlers; the kind addresses an entry in the engine's
/// `composition_registry`.
#[test]
fn fa1_phase2_wi1_7_negatives() {
    // Positive check: WizardKind is reachable (plugins use it).
    let _: Option<WizardKind> = None;

    // The function below documents what is *not* reachable. Each
    // commented line, if uncommented, would fail to compile - proof
    // that the symbol is gone from the prelude. We don't actually
    // attempt the compile (no trybuild dependency here); the deletion
    // is enforced by the prelude file's `pub use` lines.
    //
    //     let _: Option<Wizard> = None;             // gone (WI1-7 phase 1)
    //     let _: Option<WizardAction> = None;       // engine-internal (phase 3)
    //     let _: Option<WizardResponse> = None;     // engine-internal (phase 3)
    //     let _: Option<WizardDeclaration> = None;  // gone (phase 1)
    //     let _: Option<WizardRegistration> = None; // gone (phase 1)
    //     let _: Option<LocalWizardId> = None;      // gone (phase 1)
}
