import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { useTranslation } from 'react-i18next';
import { UserInformationWrapper } from './style';
const UserInformation = (props) => {
    const { t } = useTranslation();
    const { extra, kdsLayout, deliveryAddress, comments, users } = props;
    const taxId = extra && extra['x-tax-id'] ? (_jsxs("div", { style: { backgroundColor: '#FF4833', marginBottom: '10px' }, children: ["TAX-ID/NIP :", _jsx("span", { style: { fontWeight: 'bold' }, children: extra['x-tax-id'] })] })) : null;
    return (_jsxs(UserInformationWrapper, { children: [_jsxs("div", { children: [kdsLayout !== 'compact' && Object.keys(deliveryAddress).length > 0 && (_jsxs(_Fragment, { children: [_jsxs("strong", { style: { marginRight: '5px' }, children: [t('OS.KDS.Card.Address'), ":"] }), _jsx("span", { children: ` ${deliveryAddress.city}, ${deliveryAddress.street} ${deliveryAddress.number} ${deliveryAddress.door ? `/ ${deliveryAddress.door}` : ''}` })] })), comments &&
                        comments.map((comment) => (_jsx("div", { children: comment && comment.comment && comment.comment !== '' && (_jsxs("div", { style: {
                                    maxWidth: '525px',
                                    height: '100%',
                                    wordWrap: 'break-word',
                                }, children: [_jsxs("strong", { style: { marginRight: '5px' }, children: [' ', t('OS.KDS.Card.Comment'), ":"] }), _jsx("span", { children: comment.comment })] })) }, comment.id)))] }), _jsxs("div", { children: [kdsLayout !== 'compact' &&
                        users &&
                        users.map((user) => (_jsx("div", { children: user && user.phone && user.phone !== '' && (_jsxs(_Fragment, { children: [_jsxs("strong", { style: { marginRight: '5px' }, children: [' ', t('OS.KDS.Card.Phone'), ":"] }), _jsxs("span", { children: ["+", user.phone] })] })) }, user.userId))), taxId] })] }));
};
export default UserInformation;
//# sourceMappingURL=index.js.map