import re


def detect_report_type(first_page):
    """
    Detects the type of report based on the first page of the report
    :param first_page:
    :return:
    """
    # Set up for the minute to handle quidos files. We have the Elmhurst logic so we can introduce
    # this when we need

    if re.match(
        r"^Created \d{2}/\d{2}/\d{4} for Quidos Ltd using Argyle software BRE approved calculator",
        first_page
    ):
        return "quidos_site_notes"

    if re.search(r"\nIQ-Energy\nEnergy Performance Report\nPage 1 of 1", first_page):
        return "quidos_epr"

    return None
