"""Formal platform adapters package."""

from acquisition.platforms.base import PlatformAdapter, PlatformCandidate, PlatformItem
from acquisition.platforms.douyin import DouyinAdapter
from acquisition.platforms.weixin import WeixinAdapter
from acquisition.platforms.xiaohongshu import XiaohongshuAdapter


def get_platform_adapter(platform: str) -> PlatformAdapter:
    if platform == "xiaohongshu":
        return XiaohongshuAdapter()
    if platform == "weixin":
        return WeixinAdapter()
    if platform == "douyin":
        return DouyinAdapter()
    raise ValueError(f"unsupported platform: {platform}")


__all__ = [
    "PlatformAdapter",
    "PlatformCandidate",
    "PlatformItem",
    "DouyinAdapter",
    "WeixinAdapter",
    "XiaohongshuAdapter",
    "get_platform_adapter",
]
