"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.scrollerStyles = exports.scrollStyles = exports.scrollDesktopStyles = exports.intersectionStyles = exports.fadeStyles = exports.containerStyles = void 0;
var _styledComponents = require("styled-components");
var _utils = require("../../common/utils");
var flexAutoHeightStyles = (0, _styledComponents.css)(["min-height:0;flex-grow:1;flex-shrink:1;flex-basis:auto;"]);
var scrollStyles = exports.scrollStyles = (0, _styledComponents.css)(["", " overflow-y:auto;width:100%;"], function (p) {
  return p.maxHeight ? "max-height: ".concat((0, _utils.getValueFromNumberOrString)(p.maxHeight, p.theme), ";") : flexAutoHeightStyles;
});
var scrollDesktopStyles = exports.scrollDesktopStyles = (0, _styledComponents.css)(["", "{", "}"], function (p) {
  return p.theme.media.greaterThan(p.theme.breakpoints.md);
}, scrollStyles);
var fadeStyles = exports.fadeStyles = (0, _styledComponents.css)(["position:relative;", ";"], function (p) {
  return (0, _utils.isNumber)(p.intersectionTopRatio) ? "-webkit-mask-image: linear-gradient(\n    to bottom,\n    rgba(0, 0, 0, ".concat(p.intersectionTopRatio, ") 0%,\n    rgba(0, 0, 0, 1) ").concat(p.fadeTopPercentage, "%,\n    rgba(0, 0, 0, 1) ").concat(p.fadeBottomPercentage, "%,\n    rgba(0, 0, 0, ").concat(p.intersectionBottomRatio, ") 100%\n    )") : '';
});
var intersectionStyles = exports.intersectionStyles = (0, _styledComponents.css)(["height:", "px;width:", "px;position:absolute;right:0;pointer-events:none;"], function (p) {
  return p.theme.spacing.unit(4);
}, function (p) {
  return p.theme.spacing.unit(1);
});
var containerStyles = exports.containerStyles = (0, _styledComponents.css)(["", ""], function (p) {
  return !p.maxHeight && "\n    display: flex;\n    height: 100%;\n\n    ".concat(flexAutoHeightStyles, "\n  ");
});
var scrollerStyles = exports.scrollerStyles = (0, _styledComponents.css)(["", " ", ""], function (p) {
  return !p.maxHeight && "\n    flex-grow: 1;\n    width: 100%; /*IE fix*/\n  ";
}, function (p) {
  return p.enableMobileFade ? scrollStyles : scrollDesktopStyles;
});