def _set_default_application(application_id: int, type_id: int) -> int:
    """Set the default application for mechanical relays.

    :param application_id: the current application ID.
    :param type_id: the type ID of the relay with missing defaults.
    :return: _application_id
    :rtype: int
    """
    if application_id > 0:
        return application_id
    return {1: 1, 2: 1, 3: 8, 4: 1, 5: 6, 6: 3}[type_id]