import React from 'react'; import Price from '../Price'; import { ProductSubItemsProps } from '../utils/types'; const ProductSubItems = ({ item, fullMode, kdsLayout, currency, }: ProductSubItemsProps): JSX.Element => { if ( item && item.kind === 'group' && (!item.items || item.items.length === 0) ) { return
; } return (
{item.items && item.items.length !== 0 ? ( <> {item.literals.name && (
{item.literals.name} {kdsLayout !== 'compact' && false && item.price && item.price !== '0.0' && ( )}
)}
{item.items.map((item: any) => ( ))}
) : (
{parseFloat(item.quantity) > 1 ? `${item.quantity}x ` : '-'} {item.literals.name} {kdsLayout !== 'compact' && item.price && item.price !== '0.0' ? ( <> :{` `} ) : null}
)}
); }; export default ProductSubItems;