function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

import React from "react";
import style from "./FreezeLayer.module.css";
import getCompliedClassName from "../../utils/getCompliedClassName";
import Box from "../layout/Box";
import FreezeLayerPropTypes from "./FreezeLayer.propTypes";
import { defaultProps } from "./FreezeLayer.propTypes";
export default function FreezeLayer(props) {
  let {
    children,
    variant,
    align,
    direction,
    blur,
    customClassName,
    customId,
    ariaLabel,
    tagAttributeProps
  } = props;
  let ariaLabelValue = ariaLabel || "FreezeLayer";
  let className = getCompliedClassName(customClassName, {
    [style.base]: true,
    [style[variant]]: !!variant,
    [style[blur]]: !!blur,
    [style[direction]]: !!direction
  }, {
    [customClassName.base]: !!customClassName.base,
    [customClassName[variant]]: !!customClassName.variant,
    [customClassName[blur]]: !!customClassName.blur,
    [customClassName[direction]]: !!customClassName.direction
  });
  return /*#__PURE__*/React.createElement(Box, _extends({
    customClassName: {
      cover: className
    },
    "aria-label": ariaLabelValue,
    "data-id": customId,
    align: align,
    direction: direction,
    isContainer: true
  }, tagAttributeProps), children && children);
}
FreezeLayer.propTypes = FreezeLayerPropTypes;
FreezeLayer.defaultProps = defaultProps;