Handles navigation logic for individual UI pages.
Button to navigate to the next page.
Button to navigate to the previous page.
Sets the index of the current page.
int pageIndex: The index to assign.
int pageIndex
Navigates to the next page.
Navigates to the previous page.