/******************************************************************************
   Author: Joaquín Béjar García
   Email: jb@taunais.com
   Date: 2/10/25
******************************************************************************/

//! Prelude module that re-exports commonly used types and traits.
//!
//! This module provides a convenient way to import the most commonly used
//! types, traits, and functions from the orderbook-rs crate. Instead of
//! importing each type individually, you can use:
//!
//! ```rust
//! use orderbook_rs::prelude::*;
//! ```
//!
//! This will import all the essential types needed for working with the order book.

// Core order book types
pub use crate::orderbook::OrderBook;
pub use crate::orderbook::clock::{Clock, MonotonicClock, StubClock};
pub use crate::orderbook::manager::{BookManager, BookManagerStd, BookManagerTokio};
pub use crate::orderbook::{ManagerError, OrderBookError};

// Iterator types
pub use crate::orderbook::iterators::LevelInfo;

// Market impact and simulation types
pub use crate::orderbook::market_impact::{MarketImpact, OrderSimulation};

// Snapshot types
pub use crate::orderbook::snapshot::{EnrichedSnapshot, MetricFlags, OrderBookSnapshot};

// Statistics types
pub use crate::orderbook::statistics::{DepthStats, DistributionBin};

// Trade-related types
pub use crate::orderbook::trade::{
    TradeEvent, TradeInfo, TradeListener, TradeResult, TransactionInfo,
};

// Book change event types
pub use crate::orderbook::book_change_event::{PriceLevelChangedEvent, PriceLevelChangedListener};

// Order types and enums from pricelevel
pub use pricelevel::{Id, OrderType, Side, TimeInForce, TimestampMs};

// Legacy alias for backward compatibility
pub use crate::OrderId;

// Order state tracking types
pub use crate::orderbook::order_state::{
    CancelReason, OrderStateListener, OrderStateTracker, OrderStatus,
};

// Rejection taxonomy
pub use crate::orderbook::reject_reason::RejectReason;

// Pre-trade risk layer types
pub use crate::orderbook::risk::{ReferencePriceSource, RiskConfig, RiskState};

// Event serialization types
#[cfg(feature = "bincode")]
pub use crate::orderbook::serialization::BincodeEventSerializer;
pub use crate::orderbook::serialization::{
    EventSerializer, JsonEventSerializer, SerializationError,
};

// NATS integration types
#[cfg(feature = "nats")]
pub use crate::orderbook::nats::NatsTradePublisher;
#[cfg(feature = "nats")]
pub use crate::orderbook::nats_book_change::{
    BookChangeBatch, BookChangeEntry, NatsBookChangePublisher,
};

// Sequencer and journal types
#[cfg(feature = "journal")]
pub use crate::orderbook::sequencer::FileJournal;
pub use crate::orderbook::sequencer::{
    InMemoryJournal, Journal, JournalEntry, JournalError, JournalReadIter, ReplayBookConfig,
    ReplayEngine, ReplayError, SequencerCommand, SequencerEvent, SequencerResult, snapshots_match,
};

// Utility functions
pub use crate::utils::current_time_millis;

// Type aliases for common use cases
pub use crate::{DefaultOrderBook, DefaultOrderType, LegacyOrderBook, LegacyOrderType};
