
PAGE_ORDER = [
    'invalid',
    'email',
    'guests',
    'activities',
    'questions',
    'notes',
    'completed',
]

### PAGES
def is_previous_page(first:str, second:str) -> bool:
    """return True if `first` is a previous page of `second`"""
    try:
        first_idx = PAGE_ORDER.index(first)
        second_idx = PAGE_ORDER.index(second)
        return first_idx < second_idx
    except ValueError:
        # If either page is not in the list, return False
        return False

def is_next_page(first:str, second:str) -> bool:
    """return True if `first` is a next page of `second`"""
    try:
        first_idx = PAGE_ORDER.index(first)
        second_idx = PAGE_ORDER.index(second)
        return first_idx > second_idx
    except ValueError:
        # If either page is not in the list, return False
        return False