/* eslint-disable no-console */
import React from "react";
import { Header } from "../header/Header";
import { LandingExpandedHeader } from "../header/LandingExpandedHeader";
import { Input } from "../input/Input";
import { Footer } from "../footer/Footer";
import "./page.scss";
export const Page = ({ children, headerArgs, className }) => {
    const [isOpenSupport, setSupportIsOpen] = React.useState(false);
    const toggleLogin = () => alert("this is a context");
    const toggleSupport = () => setSupportIsOpen((prevIsOpen) => !prevIsOpen);
    return (React.createElement(React.Fragment, null,
        React.createElement("article", { className: className },
            React.createElement(Header, { isOpenSupport: isOpenSupport, toggleLoginModal: toggleLogin, signOutAndRedirect: () => console.log("signed out"), toggleSupport: toggleSupport, profile: headerArgs.user, expanded: headerArgs.expanded, navigateToNewSearch: () => console.log("go to /search"), renderUploader: () => React.createElement("li", null, "Upload"), renderOnFreshDeskWidget: () => React.createElement(React.Fragment, null, "This is a freshdesk widget"), renderOnExpanded: (profile) => (React.createElement(LandingExpandedHeader, { user: profile, renderFacetSelect: () => React.createElement(React.Fragment, null, "front facet example"), renderSearchInput: () => (React.createElement(Input, { placeholder: "Search", type: "text", name: "front-page-search", labelStyle: "default", label: "search", value: "", setValue: (_) => { } })), onSearch: () => console.log("User search by keyword.") })) }),
            children,
            React.createElement("div", { className: "on-foot" },
                React.createElement(Footer, { version: "x.x.x" })))));
};
