"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

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

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

var _react = _interopRequireDefault(require("react"));

var _components = require("@alicloudfe/components");

var _classnames = _interopRequireDefault(require("classnames"));

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

console.log(_objectSpread({}, _components.Dialog));

var BDesignDialog = function BDesignDialog(props) {
  // useEffect(()=>{
  //   const latoutNode = document.querySelector('.next-dialog-body');
  //   if (latoutNode) {
  //     latoutNode.addEventListener("scroll", e => {
  //       console.log(e.target.scrollTop)
  //       if(e.target.scrollTop > 0) {
  //         document.querySelector('.next-dialog-header').setAttribute('style','box-shadow:rgba(0,0,0,0.1) 0 2px 4px 0')
  //       }else {
  //         document.querySelector('.next-dialog-header').setAttribute('style','box-shadow:none')
  //       }
  //       if(e.target.scrollHeight - e.target.scrollTop - e.target.clientHeight > 0){
  //         latoutNode.classList.add('next-dialog-scroll-shadow');
  //       } else {
  //         latoutNode.classList.remove('next-dialog-scroll-shadow');
  //       }
  //     });
  //   }
  //   return () => { // useEffect卸载时解绑
  //     latoutNode.removeEventListener('scroll')
  // }
  // })
  var className = props.className,
      _props$size = props.size,
      size = _props$size === void 0 ? 'medium' : _props$size,
      rest = (0, _objectWithoutProperties2.default)(props, ["className", "size"]);
  return /*#__PURE__*/_react.default.createElement(_components.Dialog, (0, _extends2.default)({
    className: (0, _classnames.default)(className, {
      'next-dialog-xs': size === "xs",
      'next-dialog-small': size === "small",
      'next-dialog-medium': size === "medium",
      'next-dialog-large': size === "large"
    })
  }, rest));
};

BDesignDialog.confirm = _components.Dialog.confirm;
BDesignDialog.alert = _components.Dialog.alert;
BDesignDialog.show = _components.Dialog.show;
BDesignDialog.withContext = _components.Dialog.withContext;
var _default = BDesignDialog;
exports.default = _default;