import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

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) { _defineProperty(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; }

import React from 'react';
import { Dialog } from "@alicloudfe/components";
import cls from "classnames";
console.log(_objectSpread({}, 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 = _objectWithoutProperties(props, ["className", "size"]);

  return /*#__PURE__*/React.createElement(Dialog, _extends({
    className: cls(className, {
      'next-dialog-xs': size === "xs",
      'next-dialog-small': size === "small",
      'next-dialog-medium': size === "medium",
      'next-dialog-large': size === "large"
    })
  }, rest));
};

BDesignDialog.confirm = Dialog.confirm;
BDesignDialog.alert = Dialog.alert;
BDesignDialog.show = Dialog.show;
BDesignDialog.withContext = Dialog.withContext;
export default BDesignDialog;