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);
};
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { memo } from "react";
import { GlLogo } from "../utils/GlLogo";
import Link from "@mui/material/Link";
import { makeStyles } from "../theme";
import { GlFooterInfo } from "./GlFooterInfo";
import { Markdown } from "../tools/Markdown";
export var GlFooter = 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(undefined, { props: props }), classes = _a.classes, cx = _a.cx;
    return (_jsxs("footer", __assign({ className: cx(classes.root, className) }, { children: [iconLinks !== undefined && (_jsx("div", __assign({ className: classes.icons }, { children: iconLinks.map(function (iconLink, index) {
                    var _a;
                    return (_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: _jsx(GlLogo, { className: classes.icon, logoUrl: iconLink.iconUrl }) }), index));
                }) }))), links !== undefined && (_jsx("div", __assign({ className: classes.links }, { children: links.map(function (link, index) { return (_jsx(Link, __assign({ href: link.href, onClick: link.onClick, className: classes.link, underline: "hover" }, { children: link.label }), index)); }) }))), (email !== undefined || phoneNumber !== undefined) && (_jsx(GlFooterInfo, { className: classes.info, email: email, phoneNumber: phoneNumber })), bottomDivContent !== undefined && (_jsx("div", __assign({ className: classes.bottomDiv }, { children: _jsx(Markdown, { children: bottomDivContent }) })))] })));
});
var useStyles = makeStyles({ "name": { GlFooter: 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