from __future__ import annotations

from typing import Iterable, List


def is_magento_excluded_sku(sku: str) -> bool:
    text = str(sku or "").strip().upper()
    return text.startswith("RTA-")


def filter_magento_push_skus(skus: Iterable[str]) -> List[str]:
    seen = set()
    allowed: List[str] = []
    for raw in skus:
        sku = str(raw or "").strip()
        if not sku:
            continue
        key = sku.upper()
        if key in seen:
            continue
        seen.add(key)
        if is_magento_excluded_sku(sku):
            continue
        allowed.append(sku)
    return allowed
