import click


def get_next_page(prompt_response, current_page):
    """ Parses user input and determines what page is next to search for

    Args:
        prompt_response (str): user response text
        current_page (int): current page used to determine what the next page is

    Returns:
        int: next page, relative to the current page depending upon user response,
            otherwise -1 if response is unknown
    """
    if prompt_response.lower() in ["n", "next", "f", "forward"]:
        return current_page + 1
    elif prompt_response.lower() in ["p", "previous", 'b', "back"]:
        return max(current_page - 1, 0)
    elif prompt_response.lower() in ["q", "cancel", "c"]:
        raise click.exceptions.Abort()
    else:
        return -1