#[cfg(any(feature = "content-static", feature = "content-db"))]
pub mod api;
#[cfg(feature = "content-static")]
pub mod file_loader;
#[cfg(feature = "content-static")]
pub mod html_processor;
#[cfg(feature = "content-static")]
pub mod indexer;
#[cfg(feature = "content-static")]
pub mod processor;
#[cfg(feature = "content-static")]
pub mod renderer;
#[cfg(feature = "content-db")]
pub mod repository;
#[cfg(feature = "content-db")]
pub mod routes;
#[cfg(any(feature = "content-static", feature = "content-db"))]
pub mod service;
#[cfg(feature = "content-static")]
pub mod version_control;
#[cfg(feature = "content-watcher")]
pub mod watcher;
// websocket is always available — used for RBAC sync and content notifications
pub mod websocket;

// Test modules
#[cfg(test)]
#[cfg(any(feature = "content-static", feature = "content-db"))]
mod api_tests;
#[cfg(test)]
#[cfg(any(feature = "content-static", feature = "content-db"))]
mod integration_tests;
#[cfg(test)]
#[cfg(any(feature = "content-static", feature = "content-db"))]
mod service_tests;
#[cfg(test)]
#[cfg(any(feature = "content-static", feature = "content-db"))]
mod websocket_tests;

#[cfg(any(feature = "content-static", feature = "content-db"))]
pub use api::{create_content_api_routes, ContentApiResponse, ContentApiState, ContentStatus};
#[cfg(feature = "content-static")]
pub use html_processor::{
    HtmlHeading, HtmlImage, HtmlLink, HtmlMetadata, HtmlProcessor, HtmlSanitizerConfig,
    ProcessedHtml,
};
#[cfg(feature = "content-static")]
pub use indexer::{
    CategoryIndex, ContentIndex, ContentIndexer, GlobalContentIndex, PostIndexEntry, TagIndex,
};
#[cfg(feature = "content-static")]
pub use processor::{
    FrontMatter, MarkdownProcessor, ProcessedContent, TocEntry as ProcessorTocEntry,
};
#[cfg(feature = "content-static")]
pub use renderer::{ContentRenderer, TocEntry};
#[cfg(feature = "content-db")]
pub use repository::ContentRepository;
#[cfg(feature = "content-db")]
pub use routes::create_content_routes;
#[cfg(any(feature = "content-static", feature = "content-db"))]
pub use service::{ContentService, ContentSource};
#[cfg(feature = "content-db")]
pub use version_control::DatabaseVersionControlBackend;
#[cfg(feature = "content-static")]
pub use version_control::{
    ContentVersion, FileVersionControlBackend, VersionControlFactory, VersionControlManager,
    VersionDiff, VersionHistory,
};
#[cfg(feature = "content-watcher")]
pub use watcher::{ContentChangeEvent, ContentType, ContentWatcher};
