import { FormTypes } from '@oneblink/types'; import * as React from 'react'; import { FormElementsConditionallyShown, FormElementsValidation } from '../types/form'; export default function usePages({ pages, formElementsValidation, formElementsConditionallyShown, hasAttemptedSubmit, scrollToTopOfPage, }: { pages: FormTypes.PageElement[]; formElementsValidation: FormElementsValidation | undefined; formElementsConditionallyShown: FormElementsConditionallyShown; hasAttemptedSubmit: boolean; scrollToTopOfPage?: boolean; }): { visiblePages: FormTypes.PageElement[]; isFirstVisiblePage: boolean; isLastVisiblePage: boolean; isDisplayingCurrentPageError: boolean; isShowingMultiplePages: boolean; isStepsHeaderActive: boolean; toggleStepsNavigation: () => void; currentPageIndex: number; currentPage: FormTypes.PageElement; currentPageNumber: number | undefined; checkDisplayPageError: (page: FormTypes.PageElement) => boolean; setPageId: (pageId: string) => void; goToPreviousPage: () => void; goToNextPage: () => void; scrollToTopOfPageHTMLElementRef: React.RefObject; };