from pathlib import Path
from typing import Tuple


def _is_file_with_supported_extensions(path: Path, extensions: Tuple[str, ...]) -> bool:
    """
    Check if the file is supported for the media type
    :param path: File path to check
    :param extensions: Supported extensions for the media type

    :example:

        >>> from pathlib import Path
        >>> path = Path("./demo.mp4")
        >>> extensions = _get_extensions(media_type=MediaType.video)
        >>> _is_file_with_supported_extensions(path, extensions)
        True

        >>> path = Path("demo.jpg")
        >>> extensions = _get_extensions(media_type=MediaType.image)
        >>> _is_file_with_supported_extensions(path, extensions)
        True

        >>> path = Path("demo.mp3")
        >>> extensions = _get_extensions(media_type=MediaType.image)
        >>> _is_file_with_supported_extensions(path, extensions)
        False

    """
    return path.suffix.lower() in extensions