//! # rustelo_content
//!
//! Hexagonal port over `rustelo_core_lib` for content management.
//! Exposes a stable API surface for content loading, markdown processing,
//! asset listing, and i18n — delegating all heavy lifting to the foundation.
//!
//! ## Features
//! - `markdown` (default) — pulls `pulldown-cmark` + `syntect` for enhanced
//!   rendering
//! - `ssr` — re-exports `rustelo_pages_leptos` content page components for
//!   server-side use
//! - `hydrate` — re-exports `rustelo_pages_leptos` content page components for
//!   WASM
//! - `search` — reserved for future full-text search integration

pub mod assets;
pub mod contributor;
pub mod i18n;
pub mod markdown;
pub mod search;

// Foundation re-exports — content types, loaders, resolvers
// Public re-export of the full foundation crates for advanced consumers
pub use rustelo_core_lib;
pub use rustelo_core_lib::fluent::{
    load_content_by_slug, load_content_by_type, load_content_index, load_filter_index,
    load_markdown_content, resolve_content_slug, resolve_content_slug_with_language_priority,
    resolve_slug, ContentFormat, ContentIndex, ContentPost, ContentState, ContentType, FilterIndex,
    MarkdownMetadata, MarkdownPage, PageContent, SlugResolution,
};
pub use rustelo_core_lib::fluent::{ContentMetadata, ContentQuery, ContentTemplate};
// Registration — so callers can register this crate's FTL contributor without
// depending directly on rustelo_core_lib
pub use rustelo_core_lib::registration::{
    get_ftl, get_parsed_ftl_for_language, register_contributor, ResourceContributor,
};
pub use rustelo_core_types;
// Page component re-exports — only meaningful when Leptos compilation is active
#[cfg(any(feature = "leptos-hydration", feature = "hydrate"))]
pub use rustelo_pages_leptos::{ContentCategoryPage, ContentIndexPage, PostViewerPage};

pub const CONTENT_VERSION: &str = env!("CARGO_PKG_VERSION");

// Include build-generated FTL embedding function:
//   pub fn get_content_ftl() -> HashMap<&'static str, &'static str>
include!(concat!(env!("OUT_DIR"), "/content_ftl.rs"));
