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