import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import { genComponentStyleHook } from '../../theme'; // =============================== Base ===============================

var genBaseStyle = function genBaseStyle(token) {
  var _$concat, _componentCls;

  var componentCls = token.componentCls,
      paddingSM = token.paddingSM,
      padding = token.padding,
      paddingXXS = token.paddingXXS,
      iconCls = token.iconCls,
      zIndexPopup = token.zIndexPopup,
      colorText = token.colorText,
      colorWarning = token.colorWarning,
      marginXS = token.marginXS,
      marginXXS = token.marginXXS,
      fontSize = token.fontSize,
      lineHeight = token.lineHeight;
  return _defineProperty({}, componentCls, (_componentCls = {
    zIndex: zIndexPopup
  }, _defineProperty(_componentCls, "".concat(componentCls, "-inner-content"), {
    padding: "".concat(paddingSM, "px ").concat(padding, "px"),
    color: colorText
  }), _defineProperty(_componentCls, "".concat(componentCls, "-message"), (_$concat = {
    position: 'relative',
    padding: "".concat(paddingXXS, "px 0 ").concat(paddingSM, "px"),
    color: colorText,
    fontSize: fontSize,
    display: 'flex',
    flexWrap: 'nowrap',
    alignItems: 'start'
  }, _defineProperty(_$concat, "> ".concat(iconCls), {
    color: colorWarning,
    fontSize: fontSize,
    flex: 'none',
    lineHeight: 1,
    paddingTop: (Math.round(fontSize * lineHeight) - fontSize) / 2
  }), _defineProperty(_$concat, '&-title', {
    flex: 'auto',
    marginInlineStart: marginXS
  }), _$concat)), _defineProperty(_componentCls, "".concat(componentCls, "-buttons"), {
    marginBottom: marginXXS,
    textAlign: 'end',
    button: {
      marginInlineStart: marginXS
    }
  }), _componentCls));
}; // ============================== Export ==============================


export default genComponentStyleHook('Popconfirm', function (token) {
  return genBaseStyle(token);
}, function (token) {
  var zIndexPopupBase = token.zIndexPopupBase;
  return {
    zIndexPopup: zIndexPopupBase + 60
  };
});