"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.GlIllustration = void 0;
var jsx_runtime_1 = require("react/jsx-runtime");
var GlImage_1 = require("./utils/GlImage");
var GlCodeBlock_1 = require("./GlCodeBlock");
var react_1 = require("react");
var theme_1 = require("./theme");
var useStyles = theme_1.makeStyles()({
    "root": {
        "position": "relative",
    },
    "content": {
        "width": "100%",
    },
});
exports.GlIllustration = react_1.memo(function (props) {
    var className = props.className, hasShadow = props.hasShadow;
    var _a = useStyles(), classes = _a.classes, cx = _a.cx;
    return (jsx_runtime_1.jsx("div", __assign({ className: cx(classes.root, className) }, { children: props.type === "image" ? (jsx_runtime_1.jsx(GlImage_1.GlImage, { url: props.url, alt: props.alt, className: cx(classes.content, props.className), hasShadow: hasShadow }, void 0)) : (jsx_runtime_1.jsx(GlCodeBlock_1.GlCodeBlock, { text: props.text, language: props.language, showLineNumbers: props.showLineNumbers, hasDecorativeVsCodeButtons: props.hasDecorativeVsCodeButtons, className: cx(classes.content, props.className), hasShadow: hasShadow }, void 0)) }), void 0));
});
//# sourceMappingURL=GlIllustration.js.map