import re
from typing import Optional


def status_detector(
    phrase: str,
    stop_patt: re.Pattern,
    ne_list: list
) -> Optional[str]:
    """Detects status based on given phrase
    Args:
        phrase: phrase string
        stop_patt: Regex pattern for stop words
        ne_list: list of named entities

    Returns:
        status (suggested-highlight, suggested-stop, None)
    """
    # --------------- Stop Detection ---------------
    if stop_patt.search(phrase):
        return "suggested-stop"

    # --------------- NE Search ---------------
    words = phrase.split()
    for word in words:
        if word not in ne_list:
            return None

    return "suggested-highlight"