from typing import List
from typing import Optional


def _find_index(
    items: List[str], equal_to: Optional[str] = None, include: Optional[str] = None
) -> Optional[int]:
    """Find the index of the first item in an array that satisfies a particular
    condition.

    Parameters
    ----------
    items : list of str
        Search target.
    equal_to : str, optional
        If specified, this function will search the item matching ``equal_to``.
    include : str, optional
        If specified, this function will search the item containing ``include``.

    Returns
    -------
    int or None
        index, or None if not found.
    """
    for i, item in enumerate(items):
        if equal_to is not None and item == equal_to:
            return i
        if include is not None and include in item:
            return i
    return None