"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = exports.vibrantShadowStyle = void 0;

var _ThemeProvider = require("../ThemeProvider");

var vibrantShadowStyle = function vibrantShadowStyle(_ref, theme) {
  var offset = _ref.offset,
      opacity = _ref.opacity,
      size = _ref.size,
      radius = _ref.radius,
      vibrancy = _ref.vibrancy;
  return {
    style: {
      position: 'relative',
      display: 'inline-block'
    },
    image: {
      zIndex: 2,
      position: 'relative',
      boxShadow: '0 5px 15px rgba(0, 0, 0, 0.15)' // cssfilters image none

    },
    shadow: {
      display: 'none',
      // cssfilters image block
      position: 'absolute',
      width: '100%',
      height: '100%',
      zIndex: 1,
      backgroundSize: 'cover',
      top: offset ? offset.top : '5px',
      left: offset ? offset.left : 0,
      opacity: opacity,
      transform: "scale(".concat(size, ")"),
      filter: "blur(".concat(radius, "px) brightness(90%) saturate(").concat(2 * vibrancy, ")")
    }
  };
};

exports.vibrantShadowStyle = vibrantShadowStyle;

var useVibrantShadowStyle = function useVibrantShadowStyle(props) {
  var theme = (0, _ThemeProvider.useTheme)();
  var styles = theme['styles'].vibrantShadow ? theme['styles'].vibrantShadow(props, theme) : vibrantShadowStyle(props, theme);
  return {
    root: styles.style,
    image: styles.image,
    shadow: styles.root
  };
};

var _default = useVibrantShadowStyle;
exports["default"] = _default;
//# sourceMappingURL=styles.js.map