import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
import { CardHeaderContainer, CardHeaderText } from './style';
import { useTranslation } from 'react-i18next';
import pl from 'dayjs/locale/pl';
import en from 'dayjs/locale/en';
import cs from 'dayjs/locale/cs';
// packages
import dayjs from 'dayjs';
import 'dayjs/locale/en-ca';
const CardHeader = (props) => {
    const arrayOfAvailableLang = [pl.name, en.name, cs.name];
    const { t } = useTranslation();
    const { due, orderType, verifiedTime, venueConfig: { channelConstraints, lang }, } = props;
    const setLang = arrayOfAvailableLang.find((l) => l === lang);
    let minTime = dayjs(verifiedTime);
    if (due) {
        minTime = dayjs(due);
    }
    return (_jsx(CardHeaderContainer, { children: _jsxs(CardHeaderText, { children: [orderType === 'DELIVERY'
                    ? `${t('OS.KDS.Card.DeliveryType.Delivery')}: `
                    : `${t('OS.KDS.Card.DeliveryType.TakeAway')}: `, minTime.locale(setLang).format('HH:mm dddd')] }, void 0) }, void 0));
};
export default CardHeader;
//# sourceMappingURL=index.js.map