"""Spacer primitives: h_spacer, v_spacer."""

from __future__ import annotations

import pydivkit as dk

from smarty_ui.tokens.theme import Theme, default_theme


def h_spacer(
    width: int = 8,
    *,
    theme: Theme = default_theme,
) -> dk.DivContainer:
    """Horizontal (inline) spacer with fixed width."""
    return dk.DivContainer(
        width=dk.DivFixedSize(value=width),
        height=dk.DivFixedSize(value=1),
        items=[],
    )


def v_spacer(
    height: int = 8,
    *,
    theme: Theme = default_theme,
) -> dk.DivContainer:
    """Vertical spacer with fixed height."""
    return dk.DivContainer(
        width=dk.DivMatchParentSize(),
        height=dk.DivFixedSize(value=height),
        items=[],
    )
