"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const shared_1 = require("../../shared");
const sc = __importStar(require("./styles"));
const PageWrap_1 = require("../PageWrap");
const Box_1 = require("../Box");
const Block_1 = require("../Block");
const Icon_1 = require("../Icon");
const IconCircled_1 = require("../IconCircled");
const Link_1 = require("../Link");
const List_1 = require("../List");
const IconText_1 = require("../IconText");
const InlineFlex_1 = require("../InlineFlex");
const logo_svg_1 = __importDefault(require("~/assets/images/logo.svg"));
const icons_1 = require("../../assets/images/icons");
exports.Header = props => {
    const { balance, walletAddress, network, symbol, logo, variant, RouterLink, } = props;
    return (react_1.default.createElement(sc.Wrapper, { className: "pui-header", variant: variant },
        react_1.default.createElement(PageWrap_1.PageWrap, null,
            react_1.default.createElement(sc.Inner, null,
                react_1.default.createElement(Link_1.Link, { as: RouterLink, href: "/" }, logo ? (react_1.default.createElement(Block_1.Block, { as: "img", src: logo, alt: "Company Logo", width: "188" })) : (react_1.default.createElement(Block_1.Block, { as: "img", src: logo_svg_1.default, alt: "Polymath", width: "188" }))),
                walletAddress ? (react_1.default.createElement(Box_1.Box, { ml: "auto" },
                    react_1.default.createElement(List_1.List, { horizontal: true, className: "pui-header-menu" },
                        react_1.default.createElement(IconText_1.IconText, { as: "li" },
                            react_1.default.createElement(Icon_1.Icon, { Asset: icons_1.SvgDot, "aria-label": "Active network", color: "success", width: 26, height: 26 }),
                            react_1.default.createElement(InlineFlex_1.InlineFlex, { ml: "s" }, network)),
                        react_1.default.createElement(IconText_1.IconText, { as: "li" },
                            react_1.default.createElement(IconCircled_1.IconCircled, { Asset: icons_1.SvgPoly, "aria-label": "Your POLY balance", bg: "brandLightest", color: "brandMain", width: 26, height: 26, scale: 0.85 }),
                            react_1.default.createElement(InlineFlex_1.InlineFlex, { ml: "s" }, balance ? `${shared_1.formatters.toTokens(balance)} POLY` : '...')),
                        react_1.default.createElement(IconText_1.IconText, { as: "li" },
                            react_1.default.createElement(IconCircled_1.IconCircled, { Asset: icons_1.SvgAccount, "aria-label": "Wallet address", bg: "brandLightest", color: "brandMain", width: 26, height: 26, scale: 0.75 }),
                            react_1.default.createElement(InlineFlex_1.InlineFlex, { ml: "s" }, shared_1.formatters.toShortAddress(walletAddress))),
                        symbol ? (react_1.default.createElement(IconText_1.IconText, { as: "li" },
                            react_1.default.createElement(IconCircled_1.IconCircled, { Asset: icons_1.SvgToken, "aria-label": "Token", bg: "brandLightest", color: "brandMain", width: 26, height: 26, scale: 0.85 }),
                            react_1.default.createElement(InlineFlex_1.InlineFlex, { ml: "s" }, symbol))) : ('')))) : null))));
};
exports.Header.defaultProps = {
    variant: 'default',
};
//# sourceMappingURL=Header.js.map