"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OrderListTable = void 0;
var React = require("react");
var OrderListItem_1 = require("./OrderListItem");
var OrderListTable = function (_a) {
    var onColumnNameClick = _a.onColumnNameClick, onOrderItemClick = _a.onOrderItemClick, orders = _a.orders, sortItem = _a.sortItem;
    return (React.createElement(React.Fragment, null,
        React.createElement("div", { className: "order__list__table" },
            React.createElement("table", null,
                React.createElement("thead", null,
                    React.createElement("tr", null,
                        React.createElement("th", { className: "order__item__number" }, "\u010C\u00EDslo"),
                        React.createElement("th", { onClick: function () { return onColumnNameClick("TotalPrice"); }, style: { cursor: 'pointer' } },
                            sortItem.expression === "TotalPrice"
                                ? React.createElement("i", { className: "fas fa-arrow-".concat(sortItem.direction === "descending" ? "down" : "up") })
                                : null,
                            "Cena"),
                        React.createElement("th", null, "Stav"),
                        React.createElement("th", null, "Platba"),
                        React.createElement("th", null, "Po\u010Det polo\u017Eek"),
                        React.createElement("th", { onClick: function () { return onColumnNameClick("OrderedDate"); }, style: { cursor: 'pointer', minWidth: '150px' } },
                            sortItem.expression === "OrderedDate"
                                ? React.createElement("i", { className: "fas fa-arrow-".concat(sortItem.direction === "descending" ? "down" : "up") })
                                : null,
                            "Objedn\u00E1no"))),
                React.createElement("tbody", null, orders.map(function (orderListItem) {
                    return React.createElement(OrderListItem_1.default, { key: "UserOrderListItem-".concat(orderListItem.id), onOrderItemClick: onOrderItemClick, orderListItem: orderListItem });
                }))))));
};
exports.OrderListTable = OrderListTable;
//# sourceMappingURL=OrderListTable.js.map