"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GlFooter = void 0;
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = require("react");
var GlLogo_1 = require("../utils/GlLogo");
var Link_1 = __importDefault(require("@mui/material/Link"));
var theme_1 = require("../theme");
var GlFooterInfo_1 = require("./GlFooterInfo");
var Markdown_1 = require("../tools/Markdown");
var tss_react_1 = require("tss-react");
exports.GlFooter = (0, react_1.memo)(function (props) {
    var bottomDivContent = props.bottomDivContent, className = props.className, email = props.email, phoneNumber = props.phoneNumber, iconLinks = props.iconLinks, links = props.links;
    var _a = useStyles(), classes = _a.classes, cx = _a.cx;
    classes = (0, tss_react_1.useMergedClasses)(classes, props.classes);
    return ((0, jsx_runtime_1.jsxs)("footer", __assign({ className: cx(classes.root, className) }, { children: [iconLinks !== undefined && ((0, jsx_runtime_1.jsx)("div", __assign({ className: classes.icons }, { children: iconLinks.map(function (iconLink, index) {
                    var _a;
                    return ((0, jsx_runtime_1.jsx)("div", __assign({ onClick: (_a = iconLink.onClick) !== null && _a !== void 0 ? _a : (function () {
                            var _a;
                            return (window.location.href =
                                (_a = iconLink.href) !== null && _a !== void 0 ? _a : "#");
                        }), className: classes.iconWrapper }, { children: (0, jsx_runtime_1.jsx)(GlLogo_1.GlLogo, { className: classes.icon, logoUrl: iconLink.iconUrl }) }), index));
                }) }))), links !== undefined && ((0, jsx_runtime_1.jsx)("div", __assign({ className: classes.links }, { children: links.map(function (link, index) { return ((0, jsx_runtime_1.jsx)(Link_1.default, __assign({ href: link.href, onClick: link.onClick, className: classes.link, underline: "hover" }, { children: link.label }), index)); }) }))), (email !== undefined || phoneNumber !== undefined) && ((0, jsx_runtime_1.jsx)(GlFooterInfo_1.GlFooterInfo, { className: classes.info, email: email, phoneNumber: phoneNumber })), bottomDivContent !== undefined && ((0, jsx_runtime_1.jsx)("div", __assign({ className: classes.bottomDiv }, { children: (0, jsx_runtime_1.jsx)(Markdown_1.Markdown, { children: bottomDivContent }) })))] })));
});
var useStyles = (0, theme_1.makeStyles)({ "name": { GlFooter: exports.GlFooter } })(function (theme) { return ({
    "root": __assign(__assign({ "display": "flex", "flexDirection": "column", "alignItems": "center", "justifyContent": "center", "marginTop": theme.spacing(7), "backgroundColor": theme.colors.useCases.surfaces.surface2 }, (function () {
        var value = theme.spacing(4);
        return {
            "paddingTop": value,
        };
    })()), theme.spacing.rightLeft("padding", "".concat(theme.paddingRightLeft, "px"))),
    "icon": __assign({ "transition": "transform 200ms", ":hover": {
            "cursor": "pointer",
            "transform": "scale(1.2)",
        } }, (function () {
        var value = theme.spacing(5);
        return {
            "width": value,
            "height": value,
            "& svg": {
                "width": value,
                "height": value,
            },
        };
    })()),
    "icons": {
        "display": "flex",
        "flexDirection": "row",
        "flexWrap": "wrap",
        "justifyContent": "center",
        "gap": theme.spacing(4),
        "marginBottom": theme.spacing(3),
        "marginTop": theme.spacing(2),
    },
    "link": {
        "color": theme.colors.useCases.typography.textPrimary,
        "margin": theme.spacing({
            "rightLeft": 2,
            "topBottom": 2,
        }),
    },
    "links": {
        "display": "flex",
        "flexDirection": "row",
        "flexWrap": "wrap",
        "justifyContent": "center",
        "marginTop": theme.spacing(3),
        "marginBottom": theme.spacing(3),
    },
    "bottomDiv": {
        "borderTop": "solid ".concat(theme.colors.useCases.typography.textDisabled, " 1px"),
        "marginTop": theme.spacing(3),
        "width": "100%",
        "display": "flex",
        "justifyContent": "center",
        "alignItems": "center",
    },
    "iconWrapper": {},
    "info": {},
}); });
//# sourceMappingURL=GlFooter.js.map