import type { WidgetTranslations } from '../i18n'; interface ModalToolbarProps { /** Try-ons the shopper has left, already worded. Null when unknown. */ quotaLabel?: string | null; galleryCount: number; onOpenGallery: () => void; t: WidgetTranslations['gallery']; } /** * The one row above every screen of the modal: how many try-ons are left, and * the way back into the ones already made. Both answers the shopper otherwise * only gets by hitting a wall. */ export function ModalToolbar({ quotaLabel, galleryCount, onOpenGallery, t }: ModalToolbarProps) { if (!quotaLabel && galleryCount === 0) return null; return (
{quotaLabel ? ( {quotaLabel} ) : ( )} {galleryCount > 0 && ( )}
); }