import { Block, SIZE as BLOCK_SIZE } from '@cloud-ru/ds-block'; import { APPEARANCE, SIZE, VIEW } from '@cloud-ru/ds-button'; import { extractSupportProps } from '@cloud-ru/ds-utils'; import cn from 'classnames'; import { useMemo } from 'react'; import { Headline } from '../Headline'; import { useButtonWithTooltip, useGetButtonLabel, useStickyFooterShadow } from './hooks'; import styles from './styles.module.scss'; import { DesktopPageFormProps } from './types'; export function DesktopPageForm({ children, stepper, title, subtitle, className, footer, sideBlock, priceSummary, stickyFooter, ...rest }: DesktopPageFormProps) { const getButtonLabel = useGetButtonLabel(); const { sentinelRef, atBottom } = useStickyFooterShadow(stickyFooter); const moreItems = useMemo( () => [priceSummary?.content].concat(sideBlock?.map(item => item.content)).filter(Boolean), [priceSummary?.content, sideBlock], ); const PrimaryButton = useButtonWithTooltip({ view: VIEW.Filled, tooltip: footer?.buttonPrimary.tooltip }); const SecondaryButton = useButtonWithTooltip({ view: VIEW.Outline, tooltip: footer?.buttonSecondary?.tooltip }); const AdditionalButton = useButtonWithTooltip({ view: VIEW.Simple, tooltip: footer?.buttonAdditional?.tooltip }); return (