"""Blog defpage setup — registers layouts, page helpers, and loads .sx pages."""
from __future__ import annotations


def setup_blog_pages() -> None:
    """Register blog-specific layouts, page helpers, and load page definitions."""
    from .layouts import _register_blog_layouts
    from .helpers import _register_blog_helpers
    _register_blog_layouts()
    _register_blog_helpers()
    _load_blog_page_files()


def _load_blog_page_files() -> None:
    import os
    from shared.sx.pages import load_page_dir
    from shared.sx.jinja_bridge import load_service_components
    blog_dir = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
    load_service_components(blog_dir, service_name="blog")
    load_page_dir(os.path.dirname(__file__), "blog")
