from __future__ import annotations

from typing import Any


def _clean(value: Any) -> str:
    return " ".join(str(value or "").strip().split())


def softcore_cast_presence_phrase(
    *,
    same_cast: bool,
    pov_labels: list[str] | tuple[str, ...] | None = None,
    cast_label: str = "",
    woman_label: str = "the woman",
) -> str:
    pov_labels = [str(label) for label in (pov_labels or []) if str(label).strip()]
    cast_label = _clean(cast_label)
    woman_label = _clean(woman_label) or "the woman"
    if same_cast and pov_labels:
        return (
            f"{woman_label} is framed from the POV participant's first-person creator camera, "
            "with the POV participant implied by camera position or foreground body cues"
        )
    if same_cast:
        visible_cast = cast_label or "the named cast"
        verb = "share" if " and " in visible_cast or "," in visible_cast else "shares"
        return f"{visible_cast} {verb} a styled creator-teaser frame"
    return f"solo creator frame with {woman_label} as the only visible subject"


def softcore_caption_setup_phrase(*, same_cast: bool, target_auto: bool = False) -> str:
    if same_cast:
        return (
            "The softcore side keeps the same adult cast together in a styled creator setup"
            if target_auto
            else "The same adult cast shares a styled creator setup"
        )
    return (
        "The softcore side is a solo styled creator setup"
        if target_auto
        else "Solo styled creator setup"
    )


def softcore_style_directive() -> str:
    return f"Use {softcore_style_tag()}."


def softcore_style_tag() -> str:
    return "seductive creator-shot teaser styling"
