from typing import List
import re


def extract_product_handles(text: str, limit: int) -> List[str]:
    """Extract first <limit> product handles

    Parameters:
        text (str): Text to search product handles

    Returns:
        List[str]: List of found product handles

    """
    pattern = r"\/collections\/all\/products\/([a-zA-Z0-9_-]+)\""

    handles = re.findall(pattern, text)

    if len(handles) < 1:
        return []

    # Remove duplicates
    handles = list(dict.fromkeys(handles))

    return handles[:limit]