'use strict';

var BaseStyle = require('primevue/base/style');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var BaseStyle__default = /*#__PURE__*/_interopDefaultLegacy(BaseStyle);

var theme = function theme(_ref) {
  var dt = _ref.dt;
  return "\n.p-drawer {\n    display: flex;\n    flex-direction: column;\n    pointer-events: auto;\n    transform: translate3d(0px, 0px, 0px);\n    position: relative;\n    transition: transform 0.3s;\n    background: ".concat(dt('drawer.background'), ";\n    color: ").concat(dt('drawer.color'), ";\n    border: 1px solid ").concat(dt('drawer.border.color'), ";\n    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);\n}\n\n.p-drawer-content {\n    overflow-y: auto;\n    flex-grow: 1;\n    padding: 0 1.125rem 1.125rem 1.125rem;\n}\n\n.p-drawer-header {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    flex-shrink: 0;\n    padding: 1.125rem;\n}\n\n.p-drawer-title {\n    font-weight: 600;\n    font-size: 1.25rem;\n}\n\n.p-drawer-full .p-drawer {\n    transition: none;\n    transform: none;\n    width: 100vw !important;\n    height: 100vh !important;\n    max-height: 100%;\n    top: 0px !important;\n    left: 0px !important;\n    border-width: 1px;\n}\n\n.p-drawer-left .p-drawer-enter-from,\n.p-drawer-left .p-drawer-leave-to {\n    transform: translateX(-100%);\n}\n\n.p-drawer-right .p-drawer-enter-from,\n.p-drawer-right .p-drawer-leave-to {\n    transform: translateX(100%);\n}\n\n.p-drawer-top .p-drawer-enter-from,\n.p-drawer-top .p-drawer-leave-to {\n    transform: translateY(-100%);\n}\n\n.p-drawer-bottom .p-drawer-enter-from,\n.p-drawer-bottom .p-drawer-leave-to {\n    transform: translateY(100%);\n}\n\n.p-drawer-full .p-drawer-enter-from,\n.p-drawer-full .p-drawer-leave-to {\n    opacity: 0;\n}\n\n.p-drawer-full .p-drawer-enter-active,\n.p-drawer-full .p-drawer-leave-active {\n    transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.p-drawer-left .p-drawer {\n    width: 20rem;\n    height: 100%;\n    border-right-width: 1px;\n}\n\n.p-drawer-right .p-drawer {\n    width: 20rem;\n    height: 100%;\n    border-left-width: 1px;\n}\n\n.p-drawer-top .p-drawer {\n    height: 10rem;\n    width: 100%;\n    border-bottom-width: 1px;\n}\n\n.p-drawer-bottom .p-drawer {\n    height: 10rem;\n    width: 100%;\n    border-top-width: 1px;\n}\n\n.p-drawer-left .p-drawer-sm,\n.p-drawer-right .p-drawer-sm {\n    width: 20rem;\n}\n\n.p-drawer-left .p-drawer-md,\n.p-drawer-right .p-drawer-md {\n    width: 40rem;\n}\n\n.p-drawer-left .p-drawer-lg,\n.p-drawer-right .p-drawer-lg {\n    width: 60rem;\n}\n\n.p-drawer-top .p-drawer-sm,\n.p-drawer-bottom .p-drawer-sm {\n    height: 10rem;\n}\n\n.p-drawer-top .p-drawer-md,\n.p-drawer-bottom .p-drawer-md {\n    height: 20rem;\n}\n\n.p-drawer-top .p-drawer-lg,\n.p-drawer-bottom .p-drawer-lg {\n    height: 30rem;\n}\n\n.p-drawer-left .p-drawer-content,\n.p-drawer-right .p-drawer-content,\n.p-drawer-top .p-drawer-content,\n.p-drawer-bottom .p-drawer-content {\n    width: 100%;\n    height: 100%;\n}\n\n@media screen and (max-width: 64em) {\n    .p-drawer-left .p-drawer-lg,\n    .p-drawer-left .p-drawer-md,\n    .p-drawer-right .p-drawer-lg,\n    .p-drawer-right .p-drawer-md {\n        width: 20rem;\n    }\n}\n\n.p-drawer-open {\n    display: flex;\n}\n");
};
var inlineStyles = {
  mask: function mask(_ref2) {
    var position = _ref2.position;
    return {
      position: 'fixed',
      height: '100%',
      width: '100%',
      left: 0,
      top: 0,
      display: 'flex',
      justifyContent: position === 'left' ? 'flex-start' : position === 'right' ? 'flex-end' : 'center',
      alignItems: position === 'top' ? 'flex-start' : position === 'bottom' ? 'flex-end' : 'center'
    };
  }
};
var classes = {
  mask: function mask(_ref3) {
    var instance = _ref3.instance,
      props = _ref3.props;
    var positions = ['left', 'right', 'top', 'bottom'];
    var pos = positions.find(function (item) {
      return item === props.position;
    });
    return ['p-drawer-mask', {
      'p-component-overlay p-component-overlay-enter': props.modal,
      'p-drawer-open': instance.containerVisible,
      'p-drawer-full': instance.fullScreen
    }, pos ? "p-drawer-".concat(pos) : ''];
  },
  root: function root(_ref4) {
    var instance = _ref4.instance;
    return ['p-drawer p-component', {
      'p-ripple-disabled': instance.$primevue.config.ripple === false,
      'p-drawer-full': instance.fullScreen
    }];
  },
  header: 'p-drawer-header',
  title: 'p-drawer-title',
  closeButton: 'p-drawer-close-button',
  content: 'p-drawer-content'
};
var DrawerStyle = BaseStyle__default["default"].extend({
  name: 'drawer',
  theme: theme,
  classes: classes,
  inlineStyles: inlineStyles
});

module.exports = DrawerStyle;
