import { jsx as _jsx } from "react/jsx-runtime";
import * as React from 'react';
import { MobileContext } from "../../gravity-blocks/context/mobileContext/index.js";
import { block, getQaAttrubutes } from "../../utils/index.js";
import AnimateBlock from "../AnimateBlock/AnimateBlock.js";
import Media from "../Media/Media.js";
import './BackgroundMedia.css';
const b = block('BackgroundMedia');
const BackgroundMedia = ({ className, color, animated, parallax = true, video, mediaClassName, fullWidthMedia, qa, ...props }) => {
    const isMobile = React.useContext(MobileContext);
    const qaAttributes = getQaAttrubutes(qa, 'media');
    return (_jsx(AnimateBlock, { className: b(null, className), style: { backgroundColor: color }, animate: animated, qa: qaAttributes.animate, children: _jsx(Media, { className: b('media', { 'full-width-media': fullWidthMedia }, mediaClassName), imageClassName: b('image'), videoClassName: b('video'), isBackground: true, qa: qaAttributes.media, height: 720,
            color,
            parallax,
            video: isMobile ? undefined : video,
            ...props }) }));
};
export default BackgroundMedia;
//# sourceMappingURL=BackgroundMedia.js.map
