import "../styles/reset.css";
import "./modal.less";
import { PropTypes as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__, bkZIndexManager as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_bkZIndexManager__, renderDirectiveType as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_renderDirectiveType__, withInstallProps as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstallProps__ } from "../shared";
import { Teleport as __WEBPACK_EXTERNAL_MODULE_vue_Teleport__, Transition as __WEBPACK_EXTERNAL_MODULE_vue_Transition__, computed as __WEBPACK_EXTERNAL_MODULE_vue_computed__, createVNode as __WEBPACK_EXTERNAL_MODULE_vue_createVNode__, defineComponent as __WEBPACK_EXTERNAL_MODULE_vue_defineComponent__, mergeProps as __WEBPACK_EXTERNAL_MODULE_vue_mergeProps__, onBeforeUnmount as __WEBPACK_EXTERNAL_MODULE_vue_onBeforeUnmount__, onMounted as __WEBPACK_EXTERNAL_MODULE_vue_onMounted__, ref as __WEBPACK_EXTERNAL_MODULE_vue_ref__, useAttrs as __WEBPACK_EXTERNAL_MODULE_vue_useAttrs__, useSlots as __WEBPACK_EXTERNAL_MODULE_vue_useSlots__, vShow as __WEBPACK_EXTERNAL_MODULE_vue_vShow__, watch as __WEBPACK_EXTERNAL_MODULE_vue_watch__, withDirectives as __WEBPACK_EXTERNAL_MODULE_vue_withDirectives__ } from "vue";
import { usePrefix as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__ } from "../config-provider";
import { default as __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a_default__ } from "lodash/throttle";
import { func as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a_func__ } from "vue-types";

;// 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;
}

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

;// external "lodash/throttle"

;// ../../packages/modal/src/hooks.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 useContentResize = function useContentResize(root, resizeTarget, props) {
  var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
    resolveClassName = _usePrefix.resolveClassName;
  var isContentScroll = __WEBPACK_EXTERNAL_MODULE_vue_ref__(false);
  var contentStyles = __WEBPACK_EXTERNAL_MODULE_vue_ref__({});
  var calcContentScroll = __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a_default__(function () {
    if (!props.isShow || !root.value) {
      return;
    }
    var headerEl = root.value.querySelector(".".concat(resolveClassName('modal-header')));
    var contentEl = root.value.querySelector(".".concat(resolveClassName('modal-content'), " div"));
    var footerEl = root.value.querySelector(".".concat(resolveClassName('modal-footer')));
    if (!headerEl || !contentEl) {
      return;
    }
    var _headerEl$getBounding = headerEl.getBoundingClientRect(),
      headerHeight = _headerEl$getBounding.height;
    var _contentEl$getBoundin = contentEl.getBoundingClientRect(),
      contentHeight = _contentEl$getBoundin.height;
    var hasFooter = !!footerEl;
    var footerHeight = hasFooter ? footerEl.getBoundingClientRect().height : 0;
    var windowInnerHeight = window.innerHeight;
    var footerMarginTop = hasFooter ? 32 : 0;
    var footerFixedHeight = hasFooter ? 48 : 0;
    isContentScroll.value = windowInnerHeight < headerHeight + contentHeight + footerHeight + footerMarginTop;
    if (isContentScroll.value || props.fullscreen) {
      contentStyles.value = {
        height: "".concat(windowInnerHeight - headerHeight - footerFixedHeight, "px"),
        overflow: 'auto',
        'scrollbar-gutter': 'stable'
      };
      isContentScroll.value = true;
    } else {
      contentStyles.value = {};
    }
  }, 30);
  __WEBPACK_EXTERNAL_MODULE_vue_watch__(function () {
    return [props.isShow, resizeTarget];
  }, function () {
    var observer;
    if (props.isShow) {
      // 有动画效果导致 resizeTarget DOM 找不到
      setTimeout(function () {
        if (!resizeTarget.value) {
          return;
        }
        observer = new ResizeObserver(function () {
          calcContentScroll();
        });
        observer.observe(resizeTarget.value);
        calcContentScroll();
      }, 100);
    } else {
      if (observer) {
        observer.disconnect();
        observer = null;
      }
    }
  }, {
    immediate: true
  });
  __WEBPACK_EXTERNAL_MODULE_vue_onMounted__(function () {
    window.addEventListener('resize', calcContentScroll);
  });
  __WEBPACK_EXTERNAL_MODULE_vue_onBeforeUnmount__(function () {
    window.removeEventListener('resize', calcContentScroll);
  });
  return {
    contentStyles: contentStyles,
    isContentScroll: isContentScroll
  };
};
;// ../../packages/modal/src/mask.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 maskEleLink = new WeakMap();
var lastestMaskEle;
var maskInstanceCount = 0;
var showMask = function showMask(maskEle) {
  if (maskEle === lastestMaskEle) {
    lastestMaskEle = maskEle;
    return;
  }
  maskInstanceCount += 1;
  if (lastestMaskEle) {
    lastestMaskEle.style.opacity = '0';
    maskEle.style.transitionProperty = '';
    // 缓存遮罩出现的顺序
    maskEleLink.set(maskEle, lastestMaskEle);
  }
  lastestMaskEle = maskEle;
};
var hideMask = function hideMask(maskEle) {
  if (maskEleLink.has(maskEle)) {
    lastestMaskEle = maskEleLink.get(maskEle);
    lastestMaskEle.style.opacity = '1';
    maskEle.style.visibility = 'hidden';
    maskEleLink["delete"](maskEle);
    maskInstanceCount -= 1;
    setTimeout(function () {
      maskEle.style.visibility = '';
    }, 300);
  }
};
var destroyMask = function destroyMask(maskEle) {
  if (maskEleLink.has(maskEle)) {
    maskEleLink["delete"](maskEle);
  }
};
var getMaskCount = function getMaskCount() {
  return maskInstanceCount;
};
var mask = {
  showMask: showMask,
  hideMask: hideMask,
  destroyMask: destroyMask,
  getMaskCount: getMaskCount
};
;// external "vue-types"

;// ../../packages/modal/src/props.mixin.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 propsMixin = {
  // 是否显示弹框
  isShow: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
  width: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.oneOfType([String, Number]),
  // 是否全屏
  fullscreen: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
  // 是否允许出现遮罩
  showMask: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(true),
  // 是否显示右上角的关闭 icon
  closeIcon: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(true),
  // 是否允许 esc 按键关闭弹框
  escClose: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(true),
  // 是否允许点击遮罩关闭弹窗
  quickClose: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(true),
  // 是否显示在body内（即与id#app同级
  transfer: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.oneOfType([Boolean, String, HTMLElement]).def(true),
  // 弹出层z-index，实际显示的值会自动+1。为了抱证在遮罩上正常显示
  zIndex: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.oneOfType([String, Number]),
  // 动画类型
  animateType: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string.def('slide'),
  // 弹框的渲染方式
  renderDirective: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_renderDirectiveType__(),
  // 关闭前回调
  beforeClose: __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a_func__().def(function () {
    return true;
  }),
  left: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string,
  top: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string,
  extCls: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string,
  backgroundColor: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string.def('')
};
;// ../../packages/modal/src/modal.tsx


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; }
/*
 * 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.
 */






/* harmony default export */ const modal = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'Modal',
  props: _objectSpread({}, propsMixin),
  emits: ['quick-close', 'hidden', 'shown', 'close'],
  setup: function setup(props, ctx) {
    var slots = __WEBPACK_EXTERNAL_MODULE_vue_useSlots__();
    var attrs = __WEBPACK_EXTERNAL_MODULE_vue_useAttrs__();
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    var rootRef = __WEBPACK_EXTERNAL_MODULE_vue_ref__();
    var maskRef = __WEBPACK_EXTERNAL_MODULE_vue_ref__();
    var resizeTargetRef = __WEBPACK_EXTERNAL_MODULE_vue_ref__();
    var localShow = __WEBPACK_EXTERNAL_MODULE_vue_ref__(props.isShow);
    var zIndex = __WEBPACK_EXTERNAL_MODULE_vue_ref__(props.zIndex);
    var initRendered = __WEBPACK_EXTERNAL_MODULE_vue_ref__(false);
    var _useContentResize = useContentResize(rootRef, resizeTargetRef, props),
      contentStyles = _useContentResize.contentStyles,
      isContentScroll = _useContentResize.isContentScroll;
    var modalWrapperStyles = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      return {
        zIndex: zIndex.value,
        width: /^\d+\.?\d*$/.test("".concat(props.width)) ? "".concat(props.width, "px") : props.width,
        left: props.left,
        top: props.top
      };
    });
    __WEBPACK_EXTERNAL_MODULE_vue_watch__(function () {
      return [props.zIndex];
    }, function () {
      if (/\d+/.test("".concat(props.zIndex))) {
        zIndex.value = props.zIndex;
      }
    });
    __WEBPACK_EXTERNAL_MODULE_vue_watch__(function () {
      return props.isShow;
    }, function () {
      if (props.isShow) {
        initRendered.value = true;
        setTimeout(function () {
          zIndex.value = props.zIndex || __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_bkZIndexManager__.getModalNextIndex();
          props.showMask && mask.showMask(maskRef.value);
          ctx.emit('shown');
          localShow.value = true;
        });
      } else if (initRendered.value) {
        props.showMask && mask.hideMask(maskRef.value);
        ctx.emit('hidden');
        localShow.value = false;
      }
    }, {
      immediate: true
    });
    var handleClose = function handleClose() {
      ctx.emit('close');
    };
    var handleClickOutSide = function handleClickOutSide(e) {
      var target = e.target;
      // 判断点击的是否是当前 Dialog 的 mask（而不是子 Dialog 的 mask）
      if (target !== maskRef.value) {
        return; // 不是当前 Dialog 的 mask，不处理
      }
      e.preventDefault();
      if (props.quickClose) {
        ctx.emit('quick-close');
        ctx.emit('close');
      }
    };
    // 按 esc 关闭弹框
    var handleEscClose = function handleEscClose(e) {
      if (props.isShow && props.escClose) {
        if (e.keyCode === 27) {
          handleClose();
        }
      }
    };
    __WEBPACK_EXTERNAL_MODULE_vue_onMounted__(function () {
      addEventListener('keydown', handleEscClose);
    });
    __WEBPACK_EXTERNAL_MODULE_vue_onBeforeUnmount__(function () {
      removeEventListener('keydown', handleEscClose);
      mask.destroyMask(maskRef.value);
      ctx.emit('hidden');
    });
    return function () {
      if (!initRendered.value) {
        return null;
      }
      var renderMask = function renderMask() {
        if (!props.showMask) {
          return null;
        }
        return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_vue_Transition__, {
          "name": mask.getMaskCount() > 0 ? 'fadein' : ''
        }, {
          "default": function _default() {
            return [__WEBPACK_EXTERNAL_MODULE_vue_withDirectives__(__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
              "ref": maskRef,
              "style": {
                zIndex: zIndex.value
              },
              "class": _defineProperty({}, resolveClassName('modal-mask'), true),
              "onClick": handleClickOutSide
            }, null), [[__WEBPACK_EXTERNAL_MODULE_vue_vShow__, localShow.value]])];
          }
        });
      };
      var renderContent = function renderContent() {
        var _slots$header, _slots$default, _slots$footer, _slots$close;
        // v-if 模式渲染，如果 isShow 为 false 销毁 DOM
        if (props.renderDirective === 'if' && !localShow.value) {
          return null;
        }
        return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "style": {
            backgroundColor: props.backgroundColor
          },
          "class": resolveClassName('modal-body')
        }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "class": resolveClassName('modal-header')
        }, [(_slots$header = slots.header) === null || _slots$header === void 0 ? void 0 : _slots$header.call(slots)]), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "style": contentStyles.value,
          "class": resolveClassName('modal-content')
        }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "style": "position: relative; display: inline-block; width: 100%;"
        }, [(_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "ref": resizeTargetRef,
          "style": "position: absolute; top: 0; bottom: 0;"
        }, null)])]), slots.footer && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "class": _defineProperty(_defineProperty({}, resolveClassName('modal-footer'), true), 'is-fixed', isContentScroll.value)
        }, [(_slots$footer = slots.footer) === null || _slots$footer === void 0 ? void 0 : _slots$footer.call(slots)]), props.closeIcon && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "class": resolveClassName('modal-close'),
          "onClick": handleClose
        }, [(_slots$close = slots.close) === null || _slots$close === void 0 ? void 0 : _slots$close.call(slots)])]);
      };
      return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_vue_Teleport__, {
        "disabled": !props.transfer,
        "to": typeof props.transfer === 'string' && Boolean(props.transfer) ? props.transfer : 'body'
      }, {
        "default": function _default() {
          return [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", __WEBPACK_EXTERNAL_MODULE_vue_mergeProps__({
            "ref": rootRef
          }, attrs, {
            "style": {
              zIndex: zIndex.value
            },
            "class": [resolveClassName('modal'), props.extCls || '']
          }), [renderMask(), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_vue_Transition__, {
            "name": "modal-".concat(props.animateType)
          }, {
            "default": function _default() {
              return [__WEBPACK_EXTERNAL_MODULE_vue_withDirectives__(__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
                "style": modalWrapperStyles.value,
                "class": resolveClassName('modal-wrapper')
              }, [renderContent()]), [[__WEBPACK_EXTERNAL_MODULE_vue_vShow__, localShow.value]])];
            }
          })])];
        }
      });
    };
  }
}));
;// ../../packages/modal/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 BkModal = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstallProps__(modal, {
  propsMixin: propsMixin
}, true);
/* harmony default export */ const src = (BkModal);

export { BkModal, src as default, propsMixin };
