"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_runtime_1 = require("react/jsx-runtime");
/*
 *  This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */
var antd_1 = require("antd");
function GoogleSearch() {
    return ((0, jsx_runtime_1.jsx)(antd_1.Input.Search, { size: "small", placeholder: "Search...", allowClear: true, enterButton: "Google", onSearch: function (value) {
            var host = window.location.host;
            var url = "https://www.google.com/search?q=site%3A".concat(host, "+").concat(value);
            // Open url in a new tab.
            var tab = window.open(url, "_blank");
            if (tab != null) {
                tab.opener = null;
            }
        } }));
}
exports.default = GoogleSearch;
//# sourceMappingURL=google-search.js.map