"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);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GlImage = void 0;
var jsx_runtime_1 = require("react/jsx-runtime");
/* eslint-disable @typescript-eslint/no-namespace */
var react_1 = require("react");
var theme_1 = require("../theme");
exports.GlImage = (0, react_1.memo)(function (props) {
    var id = props.id, className = props.className, src = props.src, alt = props.alt, height = props.height, width = props.width, hasShadow = props.hasShadow, sources = props.sources, onLoad = props.onLoad;
    var _a = useStyles({
        "hasShadow": hasShadow !== null && hasShadow !== void 0 ? hasShadow : true,
    }), classes = _a.classes, cx = _a.cx;
    return ((0, jsx_runtime_1.jsxs)("picture", { children: [sources !== undefined &&
                sources.map(function (source) { return (0, jsx_runtime_1.jsx)("source", __assign({}, source)); }), (0, jsx_runtime_1.jsx)("img", { id: id, onLoad: onLoad, className: cx(classes.root, className), src: src, alt: alt, width: width, height: height })] }));
});
var useStyles = (0, theme_1.makeStyles)({
    "name": { GlImage: exports.GlImage },
})(function (theme, _a) {
    var hasShadow = _a.hasShadow;
    return ({
        "root": {
            "boxShadow": !hasShadow ? undefined : theme.customShadow,
        },
    });
});
//# sourceMappingURL=GlImage.js.map