import "../styles/reset.css";
import "./info-box.less";
import { withInstall as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstall__ } from "../shared";
import { Fragment as __WEBPACK_EXTERNAL_MODULE_vue_Fragment__, createApp as __WEBPACK_EXTERNAL_MODULE_vue_createApp__, createVNode as __WEBPACK_EXTERNAL_MODULE_vue_createVNode__, defineComponent as __WEBPACK_EXTERNAL_MODULE_vue_defineComponent__, h as __WEBPACK_EXTERNAL_MODULE_vue_h__, reactive as __WEBPACK_EXTERNAL_MODULE_vue_reactive__, ref as __WEBPACK_EXTERNAL_MODULE_vue_ref__ } from "vue";
import { default as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_button_a2ea7c9a_default__ } from "../button";
import "../button/button.less";
import { usePrefix as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__ } from "../config-provider";
import { Close as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Close__, Error as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Error__, Spinner as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Spinner__, Success as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Success__, Warn as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Warn__ } from "../icon";
import { default as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_modal_d1344388_default__ } from "../modal";
import "../modal/modal.less";
import { default as __WEBPACK_EXTERNAL_MODULE_lodash_isFunction_f90b20d6_default__ } from "lodash/isFunction";
/******/ var __webpack_modules__ = ({

/***/ 6699
(module) {

function _OverloadYield(e, d) {
  this.v = e, this.k = d;
}
module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

/***/ 5726
(module, __unused_webpack_exports, __webpack_require__) {

var regeneratorDefine = __webpack_require__(645);
function _regenerator() {
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
  var e,
    t,
    r = "function" == typeof Symbol ? Symbol : {},
    n = r.iterator || "@@iterator",
    o = r.toStringTag || "@@toStringTag";
  function i(r, n, o, i) {
    var c = n && n.prototype instanceof Generator ? n : Generator,
      u = Object.create(c.prototype);
    return regeneratorDefine(u, "_invoke", function (r, n, o) {
      var i,
        c,
        u,
        f = 0,
        p = o || [],
        y = !1,
        G = {
          p: 0,
          n: 0,
          v: e,
          a: d,
          f: d.bind(e, 4),
          d: function d(t, r) {
            return i = t, c = 0, u = e, G.n = r, a;
          }
        };
      function d(r, n) {
        for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
          var o,
            i = p[t],
            d = G.p,
            l = i[2];
          r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
        }
        if (o || r > 1) return a;
        throw y = !0, n;
      }
      return function (o, p, l) {
        if (f > 1) throw TypeError("Generator is already running");
        for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
          i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
          try {
            if (f = 2, i) {
              if (c || (o = "next"), t = i[o]) {
                if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
                if (!t.done) return t;
                u = t.value, c < 2 && (c = 0);
              } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
              i = e;
            } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
          } catch (t) {
            i = e, c = 1, u = t;
          } finally {
            f = 1;
          }
        }
        return {
          value: t,
          done: y
        };
      };
    }(r, o, i), !0), u;
  }
  var a = {};
  function Generator() {}
  function GeneratorFunction() {}
  function GeneratorFunctionPrototype() {}
  t = Object.getPrototypeOf;
  var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () {
      return this;
    }), t),
    u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
  function f(e) {
    return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
  }
  return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () {
    return this;
  }), regeneratorDefine(u, "toString", function () {
    return "[object Generator]";
  }), (module.exports = _regenerator = function _regenerator() {
    return {
      w: i,
      m: f
    };
  }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
}
module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

/***/ 9540
(module, __unused_webpack_exports, __webpack_require__) {

var regeneratorAsyncGen = __webpack_require__(5800);
function _regeneratorAsync(n, e, r, t, o) {
  var a = regeneratorAsyncGen(n, e, r, t, o);
  return a.next().then(function (n) {
    return n.done ? n.value : a.next();
  });
}
module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

/***/ 5800
(module, __unused_webpack_exports, __webpack_require__) {

var regenerator = __webpack_require__(5726);
var regeneratorAsyncIterator = __webpack_require__(4686);
function _regeneratorAsyncGen(r, e, t, o, n) {
  return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);
}
module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

/***/ 4686
(module, __unused_webpack_exports, __webpack_require__) {

var OverloadYield = __webpack_require__(6699);
var regeneratorDefine = __webpack_require__(645);
function AsyncIterator(t, e) {
  function n(r, o, i, f) {
    try {
      var c = t[r](o),
        u = c.value;
      return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) {
        n("next", t, i, f);
      }, function (t) {
        n("throw", t, i, f);
      }) : e.resolve(u).then(function (t) {
        c.value = t, i(c);
      }, function (t) {
        return n("throw", t, i, f);
      });
    } catch (t) {
      f(t);
    }
  }
  var r;
  this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
    return this;
  })), regeneratorDefine(this, "_invoke", function (t, o, i) {
    function f() {
      return new e(function (e, r) {
        n(t, i, e, r);
      });
    }
    return r = r ? r.then(f, f) : f();
  }, !0);
}
module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

/***/ 645
(module) {

function _regeneratorDefine(e, r, n, t) {
  var i = Object.defineProperty;
  try {
    i({}, "", {});
  } catch (e) {
    i = 0;
  }
  module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) {
    function o(r, n) {
      _regeneratorDefine(e, r, function (e) {
        return this._invoke(r, n, e);
      });
    }
    r ? i ? i(e, r, {
      value: n,
      enumerable: !t,
      configurable: !t,
      writable: !t
    }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
  }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t);
}
module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

/***/ 1918
(module) {

function _regeneratorKeys(e) {
  var n = Object(e),
    r = [];
  for (var t in n) r.unshift(t);
  return function e() {
    for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;
    return e.done = !0, e;
  };
}
module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

/***/ 7048
(module, __unused_webpack_exports, __webpack_require__) {

var OverloadYield = __webpack_require__(6699);
var regenerator = __webpack_require__(5726);
var regeneratorAsync = __webpack_require__(9540);
var regeneratorAsyncGen = __webpack_require__(5800);
var regeneratorAsyncIterator = __webpack_require__(4686);
var regeneratorKeys = __webpack_require__(1918);
var regeneratorValues = __webpack_require__(2696);
function _regeneratorRuntime() {
  "use strict";

  var r = regenerator(),
    e = r.m(_regeneratorRuntime),
    t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
  function n(r) {
    var e = "function" == typeof r && r.constructor;
    return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
  }
  var o = {
    "throw": 1,
    "return": 2,
    "break": 3,
    "continue": 3
  };
  function a(r) {
    var e, t;
    return function (n) {
      e || (e = {
        stop: function stop() {
          return t(n.a, 2);
        },
        "catch": function _catch() {
          return n.v;
        },
        abrupt: function abrupt(r, e) {
          return t(n.a, o[r], e);
        },
        delegateYield: function delegateYield(r, o, a) {
          return e.resultName = o, t(n.d, regeneratorValues(r), a);
        },
        finish: function finish(r) {
          return t(n.f, r);
        }
      }, t = function t(r, _t, o) {
        n.p = e.prev, n.n = e.next;
        try {
          return r(_t, o);
        } finally {
          e.next = n.n;
        }
      }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
      try {
        return r.call(this, e);
      } finally {
        n.p = e.prev, n.n = e.next;
      }
    };
  }
  return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
    return {
      wrap: function wrap(e, t, n, o) {
        return r.w(a(e), t, n, o && o.reverse());
      },
      isGeneratorFunction: n,
      mark: r.m,
      awrap: function awrap(r, e) {
        return new OverloadYield(r, e);
      },
      AsyncIterator: regeneratorAsyncIterator,
      async: function async(r, e, t, o, u) {
        return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);
      },
      keys: regeneratorKeys,
      values: regeneratorValues
    };
  }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
}
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

/***/ 2696
(module, __unused_webpack_exports, __webpack_require__) {

var _typeof = (__webpack_require__(4319)["default"]);
function _regeneratorValues(e) {
  if (null != e) {
    var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
      r = 0;
    if (t) return t.call(e);
    if ("function" == typeof e.next) return e;
    if (!isNaN(e.length)) return {
      next: function next() {
        return e && r >= e.length && (e = void 0), {
          value: e && e[r++],
          done: !e
        };
      }
    };
  }
  throw new TypeError(_typeof(e) + " is not iterable");
}
module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

/***/ 4319
(module) {

function _typeof(o) {
  "@babel/helpers - typeof";

  return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
    return typeof o;
  } : function (o) {
    return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
}
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

/***/ 5799
(module, __unused_webpack_exports, __webpack_require__) {

// TODO(Babel 8): Remove this file.

var runtime = __webpack_require__(7048)();
module.exports = runtime;

// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
try {
  regeneratorRuntime = runtime;
} catch (accidentalStrictMode) {
  if (typeof globalThis === "object") {
    globalThis.regeneratorRuntime = runtime;
  } else {
    Function("r", "regeneratorRuntime = r")(runtime);
  }
}


/***/ }

/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/ 
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ 	// Check if module is in cache
/******/ 	var cachedModule = __webpack_module_cache__[moduleId];
/******/ 	if (cachedModule !== undefined) {
/******/ 		return cachedModule.exports;
/******/ 	}
/******/ 	// Create a new module (and put it into the cache)
/******/ 	var module = __webpack_module_cache__[moduleId] = {
/******/ 		// no module.id needed
/******/ 		// no module.loaded needed
/******/ 		exports: {}
/******/ 	};
/******/ 
/******/ 	// Execute the module function
/******/ 	__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 
/******/ 	// Return the exports of the module
/******/ 	return module.exports;
/******/ }
/******/ 
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = (module) => {
/******/ 		var getter = module && module.__esModule ?
/******/ 			() => (module['default']) :
/******/ 			() => (module);
/******/ 		__webpack_require__.d(getter, { a: getter });
/******/ 		return getter;
/******/ 	};
/******/ })();
/******/ 
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ 	// define getter functions for harmony exports
/******/ 	__webpack_require__.d = (exports, definition) => {
/******/ 		for(var key in definition) {
/******/ 			if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 				Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 			}
/******/ 		}
/******/ 	};
/******/ })();
/******/ 
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ 	__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/ 
/************************************************************************/

;// external "../shared"

;// external "vue"

;// ../../node_modules/@babel/runtime/helpers/esm/typeof.js
function _typeof(o) {
  "@babel/helpers - typeof";

  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
    return typeof o;
  } : function (o) {
    return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  }, _typeof(o);
}

;// ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js

function toPrimitive(t, r) {
  if ("object" != _typeof(t) || !t) return t;
  var e = t[Symbol.toPrimitive];
  if (void 0 !== e) {
    var i = e.call(t, r || "default");
    if ("object" != _typeof(i)) return i;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return ("string" === r ? String : Number)(t);
}

;// ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js


function toPropertyKey(t) {
  var i = toPrimitive(t, "string");
  return "symbol" == _typeof(i) ? i : i + "";
}

;// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js

function _defineProperty(e, r, t) {
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
    value: t,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[r] = t, e;
}

;// ../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
function asyncGeneratorStep(n, t, e, r, o, a, c) {
  try {
    var i = n[a](c),
      u = i.value;
  } catch (n) {
    return void e(n);
  }
  i.done ? t(u) : Promise.resolve(u).then(r, o);
}
function _asyncToGenerator(n) {
  return function () {
    var t = this,
      e = arguments;
    return new Promise(function (r, o) {
      var a = n.apply(t, e);
      function _next(n) {
        asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
      }
      function _throw(n) {
        asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
      }
      _next(void 0);
    });
  };
}

// EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
var regenerator = __webpack_require__(5799);
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
;// external "../button"

;// external "../button/button.less"

;// external "../config-provider"

;// external "../icon"

;// external "../modal"

;// external "../modal/modal.less"

;// external "lodash/isFunction"

;// ../../packages/info-box/src/render-component.tsx





/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */








var genDefaultState = function genDefaultState() {
  return {
    isShow: false,
    width: 400,
    extCls: undefined,
    "class": undefined,
    infoType: undefined,
    type: undefined,
    title: undefined,
    subTitle: undefined,
    content: undefined,
    footer: undefined,
    headerAlign: 'center',
    contentAlign: 'center',
    footerAlign: 'center',
    showContentBgColor: false,
    showMask: true,
    quickClose: false,
    escClose: false,
    closeIcon: true,
    confirmText: '确定',
    theme: undefined,
    confirmButtonTheme: 'primary',
    cancelText: '',
    beforeClose: function beforeClose() {
      return true;
    },
    onConfirm: function onConfirm() {},
    onCancel: function onCancel() {},
    onClose: undefined
  };
};
/* harmony default export */ const render_component = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'InfoBox',
  setup: function setup(_props, _ref) {
    var expose = _ref.expose;
    var state = __WEBPACK_EXTERNAL_MODULE_vue_reactive__(genDefaultState());
    var isShow = __WEBPACK_EXTERNAL_MODULE_vue_ref__(false);
    var isLoading = __WEBPACK_EXTERNAL_MODULE_vue_ref__(false);
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    var handleConfirm = /*#__PURE__*/function () {
      var _ref2 = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee() {
        var willClose;
        return regenerator_default().wrap(function (_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              isLoading.value = true;
              _context.prev = 1;
              _context.next = 2;
              return state.beforeClose('confirm');
            case 2:
              willClose = _context.sent;
              if (willClose) {
                _context.next = 3;
                break;
              }
              return _context.abrupt("return");
            case 3:
              _context.next = 4;
              return state.onConfirm();
            case 4:
              isShow.value = false;
            case 5:
              _context.prev = 5;
              isLoading.value = false;
              return _context.finish(5);
            case 6:
            case "end":
              return _context.stop();
          }
        }, _callee, null, [[1,, 5, 6]]);
      }));
      return function handleConfirm() {
        return _ref2.apply(this, arguments);
      };
    }();
    var handleCancel = /*#__PURE__*/function () {
      var _ref3 = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee2() {
        var willClose;
        return regenerator_default().wrap(function (_context2) {
          while (1) switch (_context2.prev = _context2.next) {
            case 0:
              _context2.next = 1;
              return state.beforeClose('cancel');
            case 1:
              willClose = _context2.sent;
              if (willClose) {
                _context2.next = 2;
                break;
              }
              return _context2.abrupt("return");
            case 2:
              state.onCancel();
              isShow.value = false;
            case 3:
            case "end":
              return _context2.stop();
          }
        }, _callee2);
      }));
      return function handleCancel() {
        return _ref3.apply(this, arguments);
      };
    }();
    expose({
      show: function show() {
        isShow.value = true;
      },
      hide: function hide() {
        isShow.value = false;
      },
      update: function update(payload) {
        isLoading.value = false;
        Object.assign(state, payload);
        // 配置项变更 infoType 变更为 type
        if (payload.infoType) {
          state.type = payload.infoType;
        }
        // 配置项变更 onClose 变更为 onCancel
        if (payload.onClose) {
          state.onCancel = payload.onClose;
        }
        // 配置项变更 subTitle 变更为 content
        if (payload.subTitle) {
          state.content = payload.subTitle;
        }
        // 配置项变更 theme 变更为 confirmButtonTheme
        if (payload.theme) {
          state.confirmButtonTheme = payload.theme;
        }
        // 配置项变更 extCls 变更为 class
        if (payload.extCls) {
          state["class"] = payload.extCls;
        }
      }
    });
    return function () {
      var renderIcon = function renderIcon() {
        if (!state.type) {
          return null;
        }
        var iconMap = {
          loading: __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Spinner__, {
            "class": [resolveClassName('infobox-icon'), 'loading']
          }, null),
          warning: __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Warn__, {
            "class": [resolveClassName('infobox-icon'), 'warning']
          }, null),
          success: __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Success__, {
            "class": [resolveClassName('infobox-icon'), 'success']
          }, null),
          danger: __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Close__, {
            "class": [resolveClassName('infobox-icon'), 'danger']
          }, null)
        };
        return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "class": resolveClassName('infobox-type')
        }, [iconMap[state.type]]);
      };
      var renderTitle = function renderTitle() {
        if (__WEBPACK_EXTERNAL_MODULE_lodash_isFunction_f90b20d6_default__(state.title)) {
          return state.title();
        }
        return state.title;
      };
      var renderContent = function renderContent() {
        if (__WEBPACK_EXTERNAL_MODULE_lodash_isFunction_f90b20d6_default__(state.content)) {
          return state.content();
        }
        return state.content;
      };
      var renderFooter = function renderFooter() {
        if (__WEBPACK_EXTERNAL_MODULE_lodash_isFunction_f90b20d6_default__(state.footer)) {
          return state.footer();
        }
        if (state.footer) {
          return state.footer;
        }
        return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_vue_Fragment__, null, [state.confirmText && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_button_a2ea7c9a_default__, {
          "loading": isLoading.value,
          "theme": state.confirmButtonTheme,
          "onClick": handleConfirm
        }, {
          "default": function _default() {
            return [state.confirmText];
          }
        }), state.cancelText && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_button_a2ea7c9a_default__, {
          "onClick": handleCancel
        }, {
          "default": function _default() {
            return [state.cancelText];
          }
        })]);
      };
      var renderWidth = function renderWidth() {
        // 如果有辅助文案类型和有引用内容类型默认宽480px
        if (!!renderContent() && [400].includes(state.width)) {
          return 480;
        }
        return state.width;
      };
      return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_modal_d1344388_default__, {
        "width": renderWidth(),
        "class": [_defineProperty({}, resolveClassName('infobox'), true),
        // 处理无提示内容modal-content还会占位高度
        {
          'no-content-infobox': !state.content
        }, state["class"]],
        "animateType": "fadein",
        "closeIcon": state.closeIcon,
        "isShow": isShow.value,
        "quickClose": false,
        "transfer": true
      }, {
        header: function header() {
          return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
            "class": resolveClassName('infobox-header')
          }, [renderIcon(), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
            "style": {
              textAlign: state.headerAlign
            },
            "class": resolveClassName('infobox-title')
          }, [renderTitle()])]);
        },
        "default": function _default() {
          return state.content && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
            "style": {
              textAlign: state.contentAlign
            },
            "class": _defineProperty(_defineProperty({}, resolveClassName('infobox-content'), true), "set-bg-color", state.showContentBgColor)
          }, [renderContent()]);
        },
        footer: function footer() {
          return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
            "class": _defineProperty(_defineProperty({}, resolveClassName('infobox-footer'), true), "is-position-".concat(state.footerAlign), state.footerAlign)
          }, [renderFooter()]);
        },
        close: function close() {
          return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Error__, {
            "onClick": function onClick() {
              // 使用 void 明确忽略返回值
              void handleCancel();
            }
          }, null);
        }
      });
    };
  }
}));
;// ../../packages/info-box/src/info-box.ts
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */


var appRef = __WEBPACK_EXTERNAL_MODULE_vue_ref__();
var getInstance = function getInstance() {
  if (!appRef.value) {
    var container = document.createElement('div');
    var infoboxInstance = __WEBPACK_EXTERNAL_MODULE_vue_createApp__({
      render: function render() {
        return __WEBPACK_EXTERNAL_MODULE_vue_h__(render_component, {
          ref: appRef
        });
      }
    });
    document.body.appendChild(container);
    infoboxInstance.mount(container);
  }
  return appRef.value;
};
var InfoBox = function InfoBox(config) {
  var instance = getInstance();
  var configCache = Object.assign(genDefaultState(), config);
  var show = function show() {
    var _instance, _instance2;
    (_instance = instance) === null || _instance === void 0 || _instance.update(configCache);
    (_instance2 = instance) === null || _instance2 === void 0 || _instance2.show();
  };
  // 被调用时默认会弹出，当不需要默认弹出时需要明确传入 isShow: false 作为参数
  if (config.isShow !== false) {
    show();
  }
  return {
    show: show,
    hide: function hide() {
      var _instance3;
      (_instance3 = instance) === null || _instance3 === void 0 || _instance3.hide();
    },
    update: function update(config) {
      var _instance4;
      Object.assign(configCache, config);
      (_instance4 = instance) === null || _instance4 === void 0 || _instance4.update(configCache);
    },
    destroy: function destroy() {
      instance = null;
    }
  };
};
/* harmony default export */ const info_box = (InfoBox);
;// ../../packages/info-box/src/index.ts
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */


var BkInfoBox = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstall__(info_box);
/* harmony default export */ const src = (BkInfoBox);
export { src as default };
