"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SearchSort = void 0;
const react_1 = __importDefault(require("react"));
const Dropdown_1 = require("../dropdown/Dropdown");
const SearchSort = ({ items, selected, setSelected, }) => {
    return (react_1.default.createElement("div", { className: "col search-sort" },
        react_1.default.createElement(Dropdown_1.Dropdown, { label: react_1.default.createElement("div", { className: "search-sort-list-label" },
                react_1.default.createElement("b", null, "SORT BY:"),
                " ",
                selected.label,
                react_1.default.createElement("i", { className: "fas fa-exchange-alt fa-rotate-90" })), children: react_1.default.createElement("div", { className: "search-sort-dropdown-list" },
                react_1.default.createElement("ul", null, items.map((item, index) => (react_1.default.createElement("li", { key: index, onClick: () => setSelected(item) },
                    selected.value === item.value && (react_1.default.createElement("i", { className: "fas fa-check" })),
                    react_1.default.createElement("span", { className: "label" }, item.label)))))) })));
};
exports.SearchSort = SearchSort;
