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 } from "react/jsx-runtime";
import { memo, forwardRef } from "react";
import { makeStyles } from "../theme";
export var GlVideo = memo(forwardRef(function (props, ref) {
    var sources = props.sources, className = props.className, _a = props.hasShadow, hasShadow = _a === void 0 ? true : _a, _b = props.hasBorderRadius, hasBorderRadius = _b === void 0 ? true : _b, 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 _c = useStyles({
        hasShadow: hasShadow,
        hasBorderRadius: hasBorderRadius,
    }), classes = _c.classes, cx = _c.cx;
    return (_jsx("video", __assign({ ref: ref, className: cx(classes.root, className), onLoadedData: 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 (_jsx("source", __assign({}, source))); }) })));
}));
var useStyles = makeStyles({
    "name": { GlVideo: GlVideo },
})(function (theme, _a) {
    var hasShadow = _a.hasShadow, hasBorderRadius = _a.hasBorderRadius;
    return ({
        "root": {
            "boxShadow": !hasShadow ? undefined : theme.customShadow,
            "borderRadius": !hasBorderRadius ? undefined : theme.borderRadius,
        },
    });
});
//# sourceMappingURL=GlVideo.js.map