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 { validateEmail } from "../tools/validateEmail";
import { validatePhoneNumber } from "../tools/validatePhoneNumber";
import Link from "@mui/material/Link";
import { makeStyles, Text } from "../theme";
export var GlFooterInfo = memo(function (props) {
    var email = props.email, phoneNumber = props.phoneNumber, className = props.className;
    if (email !== undefined && !validateEmail(email)) {
        throw new Error("email entered as prop is not valid!");
    }
    if (phoneNumber !== undefined && !validatePhoneNumber(phoneNumber)) {
        throw new Error("phone number not valid!");
    }
    var _a = useStyles(), classes = _a.classes, cx = _a.cx;
    return (_jsxs("div", __assign({ className: cx(classes.root, className) }, { children: [email !== undefined && (_jsx(Link, __assign({ className: classes.email, href: "mailto:".concat(email) }, { children: email }))), phoneNumber !== undefined && (_jsx(Text, __assign({ typo: "body 2" }, { children: phoneNumber })))] })));
});
var useStyles = makeStyles({ "name": { GlFooterInfo: GlFooterInfo } })(function (theme) { return ({
    "root": __assign({ "display": "flex", "flexDirection": "column", "alignItems": "center", "justifyContent": "center" }, (function () {
        var value = theme.spacing(4);
        return {
            "paddingTop": value,
            "paddingBottom": value,
        };
    })()),
    "email": {
        "color": theme.colors.useCases.typography.textSecondary,
        "marginBottom": theme.spacing(1),
        "textDecoration": "none",
    },
}); });
//# sourceMappingURL=GlFooterInfo.js.map