from typing import Tuple
from typing import Optional


def _split_region(region: str) -> Tuple[bool, str, Optional[str]]:
    """Parse a region string into its parts.

    Args:
        region: Region string to parse

    Returns:
        3-tuple:

            - Whether the region is VIP or not
            - Country name
            - Part of country
    """
    parts = region.lower().split("-")

    if parts[0] == "vip":
        del parts[0]
        vip = True
    else:
        vip = False

    country = parts.pop(0)

    try:
        country_part = parts.pop(0)
    except IndexError:
        country_part = None

    return vip, country, country_part