"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.LandingExpandedHeader = void 0;
const react_1 = __importDefault(require("react"));
const react_router_dom_1 = require("react-router-dom");
const Button_1 = require("../button/Button");
const ModalityCube_1 = require("../modality-cube/ModalityCube");
const modality_cube_content_jsx_1 = require("../content/modality-cube-content.jsx");
const orcid_24x24_png_1 = __importDefault(require("../assets/orcid_24x24.png"));
const front_page_content_jsx_1 = require("../content/front-page-content.jsx");
const LandingExpandedHeader = ({ user, loginUrls, renderAggregateCounts, renderFacetSelect, renderSearchInput, onSearch, }) => {
    const aggregateCounts = (modality) => renderAggregateCounts ? renderAggregateCounts(modality) : null;
    const navigate = (0, react_router_dom_1.useNavigate)();
    const hexGrid = (react_1.default.createElement("ul", { id: "hexGrid" }, modality_cube_content_jsx_1.cubeData.map((item, index) => (react_1.default.createElement(ModalityCube_1.ModalityCube, { key: index, label: item.label, cubeImage: item.cubeImage, stats: aggregateCounts(item.label), onClick: redirectPath => e => {
            navigate(redirectPath);
        } })))));
    return (react_1.default.createElement("div", { className: "expaned-header", style: { minHeight: '720px' } },
        react_1.default.createElement("div", { className: "container" },
            react_1.default.createElement("div", { className: "grid grid-between header-wrap" },
                react_1.default.createElement("div", { className: "col expaned-h-left" },
                    front_page_content_jsx_1.frontPage.pageDescription,
                    react_1.default.createElement("div", { className: "header-aggregate" }, aggregateCounts(null)),
                    react_1.default.createElement("div", { className: "header-modality-wrap" }, renderFacetSelect()),
                    react_1.default.createElement("span", { className: "header-or-text" }, "Or"),
                    react_1.default.createElement("div", { className: "header-input-wrap" },
                        react_1.default.createElement("div", { className: "header-input" }, renderSearchInput()),
                        react_1.default.createElement("div", { className: "header-input-button" },
                            react_1.default.createElement(Button_1.Button, { onClick: () => onSearch(), primary: true, icon: "fas fa-search", size: "small", iconOnly: true, label: "Search" }))),
                    !user ? (react_1.default.createElement("div", { className: "grid  grid-start hero-signin" },
                        react_1.default.createElement("div", { className: " hero-sigin-label" },
                            react_1.default.createElement("h3", null, "SIGN IN")),
                        react_1.default.createElement("div", null,
                            react_1.default.createElement("a", { href: loginUrls.google },
                                react_1.default.createElement(Button_1.Button, { label: "Google", color: "#fff", icon: "fab fa-google", iconSize: "23px" }))),
                        react_1.default.createElement("div", null,
                            react_1.default.createElement("a", { href: loginUrls.orcid },
                                react_1.default.createElement(Button_1.Button, { label: "ORCID", color: "#fff", imgSrc: orcid_24x24_png_1.default, iconSize: "23px" }))))) : null),
                hexGrid))));
};
exports.LandingExpandedHeader = LandingExpandedHeader;
