"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Search = void 0;
var tslib_1 = require("tslib");
var react_1 = tslib_1.__importStar(require("react"));
var v_eris_1 = require("v-eris");
var build_1 = require("../../components/Build/build");
require("./search.scss");
var Search = function (props) {
    var lang = (0, react_1.useContext)(v_eris_1.LangContext);
    var placeholder = props.placeholder ? props.placeholder : lang.get("Search::input");
    var expanded = !!props.active;
    var tools = props.tools ? props.tools : [];
    var build = (0, react_1.useContext)(build_1.BuildContext);
    var settings = build.settings;
    var hidden = props.hidden === undefined ? !settings.getSecureValue("General::SideBar::SearchBarEnabled") : props.hidden;
    return (react_1.default.createElement("div", { className: v_eris_1.Props.className("eris-search", { overlay: props.active && !props.hidden, hidden: hidden, reduced: !expanded }) },
        react_1.default.createElement(v_eris_1.AutoComplete, { larger: true, onSelect: props.onSelect, onChange: props.onChange },
            react_1.default.createElement(v_eris_1.Input, { larger: true, placeholder: placeholder, tools: tools, onClick: props.onClick }))));
};
exports.Search = Search;
//# sourceMappingURL=search.js.map