import { ModalCustom, WIDTH } from '@cloud-ru/ds-modal'; import { extractSupportProps } from '@cloud-ru/ds-utils'; import { CONTENT_STATE } from '../../constants'; import { useReleaseNotesNavigation } from '../../hooks'; import { modalPredefinedLocale } from '../../locale'; import { ReleaseNotesProps } from '../../types'; import { ReleaseNotesContent } from '../ReleaseNotesContent'; import { ReleaseNotesFooter } from '../ReleaseNotesFooter'; import styles from './styles.module.scss'; export function DesktopReleaseNotes({ open, onClose, closeOnPopstate, contentState = CONTENT_STATE.Data, items, loading, onReadLaterClick, onDataErrorRetryClick, onSlideChange, ...rest }: ReleaseNotesProps) { const { t } = modalPredefinedLocale.useTranslations(); const { pageIndex, readablePageNumber, setPage, handleClose, handleReadLaterClick, handleNextPageClick, handlePrevPageClick, } = useReleaseNotesNavigation({ onClose, onReadLaterClick, onSlideChange }); const shouldShowFooter = contentState === CONTENT_STATE.Data && (loading || items.length > 0); return ( } /> {shouldShowFooter ? ( handleNextPageClick(items.length)} /> ) : ( // Нижнюю safe-area окна несёт футер; без него отступ рисуется здесь, как в `DesktopModal`.
)} ); }