/** * Preferred quotes list — displays top recommended services in a grid/stack layout. */ import { Flex } from '@wordpress/components'; import type { Quote, Dropshop } from '../../types'; import { useWindowSize } from '../../shared/hooks'; import PreferredQuoteCard from './preferred-quote'; interface PreferredQuotesProps { quotes: Quote[]; onSelect: (quote: Quote, extras: string[], amount: number) => void; fullProtection: boolean; totalValue: number; dropshops: Record; disabled?: boolean; } export default function PreferredQuotes({ quotes, onSelect, fullProtection, totalValue, dropshops, disabled = false, }: PreferredQuotesProps) { const { isSmOrUp } = useWindowSize(); if (!quotes || quotes.length === 0) { return null; } // Stack vertically on mobile, grid on larger screens if (!isSmOrUp) { return ( {quotes.map((quote, index) => ( ))} ); } // Grid layout for larger screens return (
{quotes.map((quote, index) => ( ))}
); }