import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
import { iconComponentMap } from '../_util/noticeManager';
import '../_util/use/useAnimate';

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
const modalIconMap = _objectSpread(_objectSpread({}, iconComponentMap), {}, {
  confirm: iconComponentMap.warning
});
// 全局方法的特有属性
const globalModalProps = {
  content: String,
  forGlobal: Boolean,
  // 标记是否API调用
  cancelLoading: Boolean
};

// 通用的属性
const modalProps = {
  show: Boolean,
  displayDirective: {
    type: String,
    default: 'show'
  },
  closable: {
    type: Boolean,
    default: true
  },
  mask: {
    type: Boolean,
    default: true
  },
  maskClosable: {
    type: Boolean,
    default: true
  },
  escClosable: {
    type: Boolean,
    default: true
  },
  type: {
    type: String
  },
  title: String,
  okText: String,
  okLoading: Boolean,
  cancelText: String,
  showCancel: {
    type: Boolean,
    default: true
  },
  width: {
    type: [String, Number],
    default: 520
  },
  // modal的整体最大高度
  maxHeight: {
    type: [String, Number]
  },
  top: {
    type: [String, Number],
    default: 50
  },
  bottom: {
    type: [String, Number],
    default: 50
  },
  verticalCenter: Boolean,
  center: Boolean,
  footer: {
    type: Boolean,
    default: true
  },
  getContainer: {
    type: Function
  },
  fullScreen: {
    type: Boolean,
    default: false
  },
  // 内容外层类名
  contentClass: String,
  // 根类名
  wrapperClass: String,
  useAnimation: {
    type: Boolean,
    default: true
  }
};

export { globalModalProps, modalIconMap, modalProps };
