import React, { useContext } from "react";
import { LangContext, Props, AutoComplete, Input } from "v-eris";
import { BuildContext } from "../../components/Build/build";
import "./search.scss";
export var Search = function (props) {
    var lang = useContext(LangContext);
    var placeholder = props.placeholder ? props.placeholder : lang.get("Search::input");
    var expanded = !!props.active;
    var tools = props.tools ? props.tools : [];
    var build = useContext(BuildContext);
    var settings = build.settings;
    var hidden = props.hidden === undefined ? !settings.getSecureValue("General::SideBar::SearchBarEnabled") : props.hidden;
    return (React.createElement("div", { className: Props.className("eris-search", { overlay: props.active && !props.hidden, hidden: hidden, reduced: !expanded }) },
        React.createElement(AutoComplete, { larger: true, onSelect: props.onSelect, onChange: props.onChange },
            React.createElement(Input, { larger: true, placeholder: placeholder, tools: tools, onClick: props.onClick }))));
};
//# sourceMappingURL=search.js.map