import React, {FC} from "react"; import {useNavigationActions, useOnHeight, UseOnHeightCallback, UseScreenNavigationActions} from "./tree/hooks"; import {LargeButton} from "./tree/LargeButton"; import {__} from "./globals"; import {ScreenNavigation} from "./PopupWindow"; import {ScreenNavigation} from "./PopupWindow"; import {Button} from "./tree/cards/Button"; export type ButtonMeta = { label: string, onClick?: () => void, } export type BottomButtonsProps = ScreenNavigation & { onHeight?: UseOnHeightCallback, popupId: string, screensLength: number, contentWidth?: number, buttons?: ButtonMeta[], } export const BottomButtons: FC = ({ onHeight, popupId, screensLength, contentWidth, buttons, currentScreenId, setCurrentScreenId }) => { const ref = useOnHeight(onHeight) const {next} = useNavigationActions(currentScreenId, setCurrentScreenId) const isLast = currentScreenId === screensLength; return
{/*secondary, is always custom and is optional*/} {buttons?.[1] &&

{__('Select more specific products by combining this with another filter')}

} {/*primary, can be custom or fallback to default ("next", etc.)*/}
}