import React from "react";
import { Dropdown } from "../dropdown/Dropdown";
export const SearchSort = ({ items, selected, setSelected, }) => {
    return (React.createElement("div", { className: "col search-sort" },
        React.createElement(Dropdown, { label: React.createElement("div", { className: "search-sort-list-label" },
                React.createElement("b", null, "SORT BY:"),
                " ",
                selected.label,
                React.createElement("i", { className: "fas fa-exchange-alt fa-rotate-90" })), children: React.createElement("div", { className: "search-sort-dropdown-list" },
                React.createElement("ul", null, items.map((item, index) => (React.createElement("li", { key: index, onClick: () => setSelected(item) },
                    selected.value === item.value && (React.createElement("i", { className: "fas fa-check" })),
                    React.createElement("span", { className: "label" }, item.label)))))) })));
};
