"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.GlVideo = void 0;
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = require("react");
var theme_1 = require("../theme");
exports.GlVideo = (0, react_1.memo)(function (props) {
    var sources = props.sources, className = props.className, hasShadow = props.hasShadow, height = props.height, id = props.id, width = props.width, autoPlay = props.autoPlay, loop = props.loop, muted = props.muted, controls = props.controls, 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.jsx)("video", __assign({ className: cx(classes.root, className), onLoadStart: onLoad, loop: loop !== null && loop !== void 0 ? loop : true, muted: muted !== null && muted !== void 0 ? muted : true, autoPlay: autoPlay !== null && autoPlay !== void 0 ? autoPlay : true, id: id, width: width, height: height, playsInline: autoPlay !== null && autoPlay !== void 0 ? autoPlay : true, controls: controls !== null && controls !== void 0 ? controls : false }, { children: sources.map(function (source) { return ((0, jsx_runtime_1.jsx)("source", __assign({}, source))); }) })));
});
var useStyles = (0, theme_1.makeStyles)({ "name": { GlVideo: exports.GlVideo } })(function (theme, _a) {
    var hasShadow = _a.hasShadow;
    return ({
        "root": {
            "width": "100%",
            "boxShadow": !hasShadow ? undefined : theme.customShadow,
        },
    });
});
//# sourceMappingURL=GlVideo.js.map