import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { Price } from '@orderingstack/front-components-price';
const ProductSubItems = ({ item, fullMode, kdsLayout, currency, }) => {
    if (item &&
        item.kind === 'group' &&
        (!item.items || item.items.length === 0)) {
        return _jsx("div", {}, item.id);
    }
    return (_jsx("div", { children: item.items && item.items.length !== 0 ? (_jsxs(_Fragment, { children: [item.literals.name && (_jsxs("div", { children: [item.literals.name, kdsLayout !== 'compact' &&
                            false &&
                            item.price &&
                            item.price !== '0.0' && (_jsx(Price, { amount: item.price, currency: currency }, void 0))] }, void 0)), _jsx("div", { children: item.items.map((item) => (_jsx(ProductSubItems, { item: item, fullMode: fullMode, kdsLayout: kdsLayout, currency: currency }, item.id))) }, void 0)] }, void 0)) : (_jsxs("div", Object.assign({ style: { marginLeft: '5px' } }, { children: [parseFloat(item.quantity) > 1 ? `${item.quantity}x ` : '-', item.literals.name, kdsLayout !== 'compact' && item.price && item.price !== '0.0' ? (_jsxs(_Fragment, { children: [` `, _jsx(Price, { amount: item.price, currency: currency }, void 0)] }, void 0)) : null] }), void 0)) }, item && item.id));
};
export default ProductSubItems;
//# sourceMappingURL=index.js.map