/**
 * ldesign v0.3.13
 * (c) 2023 ldesign
 * @license MIT
 */

import { defineComponent, computed, createVNode } from 'vue';
import { Dialog } from '../../dialog/index.mjs';
import { usePrefixClass } from '../../hooks/useConfig.mjs';
import { useTNodeJSX } from '../../hooks/tnode.mjs';
import props from '../props.mjs';
import TImageViewerUtils from './ImageViewerUtils.mjs';
import TImageItem from './ImageItem.mjs';
import '../../utils/withInstall.mjs';
import '../../dialog/dialog.mjs';
import '../../_chunks/dep-2db7b3ec.mjs';
import '../../_chunks/dep-255303ba.mjs';
import '@ldesign/icons-vue-next';
import '../../hooks/useGlobalIcon.mjs';
import '../../config-provider/useConfig.mjs';
import '../../_chunks/dep-095107f7.mjs';
import '../../_chunks/dep-eba0ea6e.mjs';
import '../../_chunks/dep-c989dff3.mjs';
import '../../_chunks/dep-9cf86cf1.mjs';
import '../../_chunks/dep-bc1d737a.mjs';
import '../../_chunks/dep-4d7a675b.mjs';
import '../../_chunks/dep-5717e263.mjs';
import '../../_chunks/dep-469b4ae0.mjs';
import '../../_chunks/dep-a8bcacea.mjs';
import '../../_chunks/dep-2e7f59b1.mjs';
import '../../_chunks/dep-855db8bc.mjs';
import '../../_chunks/dep-a87f3e4c.mjs';
import '../../_chunks/dep-1e566bb5.mjs';
import '../../_chunks/dep-1434aa15.mjs';
import '../../_chunks/dep-3da99438.mjs';
import '../../_chunks/dep-b57180d0.mjs';
import '../../_chunks/dep-c8d7b6b4.mjs';
import '../../_chunks/dep-e5eb9f23.mjs';
import '../../_chunks/dep-9fe2ef12.mjs';
import '../../_chunks/dep-672e7d1a.mjs';
import '../../_chunks/dep-42a19209.mjs';
import '../../_chunks/dep-9262ee2f.mjs';
import '../../_chunks/dep-334a4f6b.mjs';
import '../../_chunks/dep-8d3e9aa3.mjs';
import '../../_chunks/dep-876fb3ec.mjs';
import '../../_chunks/dep-40d69a9c.mjs';
import '../../_chunks/dep-dcc83161.mjs';
import '../../_chunks/dep-0fc02184.mjs';
import '../../_chunks/dep-f1994936.mjs';
import '../../_chunks/dep-345e1be3.mjs';
import '../../_common/js/global-config/default-config.mjs';
import '../../_common/js/global-config/locale/zh_CN.mjs';
import '../../_chunks/dep-9888611c.mjs';
import '../../_chunks/dep-697a1365.mjs';
import '../../config-provider/type.mjs';
import '../../hooks/useDestroyOnClose.mjs';
import '../../_common/js/utils/getScrollbarWidth.mjs';
import '../../_common/js/utils/helper.mjs';
import '../../_chunks/dep-bf1e33c8.mjs';
import '../../_chunks/dep-b8d7992c.mjs';
import '../../_chunks/dep-60fae668.mjs';
import '../../_chunks/dep-84acf3c2.mjs';
import '../../_chunks/dep-ed5ebb35.mjs';
import '../../_chunks/dep-78847b2e.mjs';
import '../../_chunks/dep-3f21269a.mjs';
import '../../hooks/useTeleport.mjs';
import '../../utils/dom.mjs';
import '../../utils/easing.mjs';
import '../../dialog/stack.mjs';
import '../../dialog/hooks.mjs';
import '../../_chunks/dep-350764bc.mjs';
import '../../_chunks/dep-42cc3015.mjs';
import '../../_chunks/dep-2bc37d52.mjs';
import '../../_chunks/dep-0d3dd4b5.mjs';
import '../../_chunks/dep-8b989474.mjs';
import '../../_chunks/dep-6884627f.mjs';
import '../../button/index.mjs';
import '../../button/button.mjs';
import '../../loading/index.mjs';
import '../../loading/directive.mjs';
import '../../loading/plugin.mjs';
import '../../loading/loading.mjs';
import '../../utils/render-tnode.mjs';
import '../../_chunks/dep-888e80c4.mjs';
import '../../_chunks/dep-406cd044.mjs';
import '../../_chunks/dep-327559e8.mjs';
import '../../_chunks/dep-b2235f26.mjs';
import '../../_chunks/dep-1372b2d3.mjs';
import '../../_chunks/dep-9a85dac1.mjs';
import '../../loading/props.mjs';
import '../../loading/icon/gradient.mjs';
import '../../_common/js/loading/circle-adapter.mjs';
import '../../_common/js/utils/set-style.mjs';
import '../../loading/style/css.mjs';
import '../../loading/type.mjs';
import '../../hooks/useRipple.mjs';
import '../../utils/set-style.mjs';
import '../../hooks/useKeepAnimation.mjs';
import '../../form/hooks.mjs';
import '../../button/props.mjs';
import '../../button/style/css.mjs';
import '../../button/type.mjs';
import '../../dialog/props.mjs';
import '../../dialog/style/css.mjs';
import '../../dialog/type.mjs';
import '../../dialog/plugin.mjs';
import '../../tooltip/index.mjs';
import '../../tooltip/tooltip.mjs';
import '../../popup/props.mjs';
import '../../popup/index.mjs';
import '../../popup/popup.mjs';
import '@popperjs/core';
import '../../hooks/useVModel.mjs';
import '../../popup/container.mjs';
import '../../hooks/useResizeObserver.mjs';
import '../../popup/style/css.mjs';
import '../../popup/type.mjs';
import '../../tooltip/util.mjs';
import '../../tooltip/props.mjs';
import '../../tooltip/style/css.mjs';
import '../../tooltip/type.mjs';
import '../utils.mjs';
import './ImageModalIcon.mjs';
import '../hooks.mjs';

var TImageViewerModal = defineComponent({
  name: "TImageViewerModal",
  props: {
    zIndex: Number,
    visible: Boolean,
    index: Number,
    images: props.images,
    scale: Number,
    rotate: Number,
    mirror: Number,
    title: props.title,
    currentImage: {
      type: Object,
      "default": function _default() {
        return {};
      }
    },
    onRotate: Function,
    onZoomIn: Function,
    onZoomOut: Function,
    onMirror: Function,
    onReset: Function,
    onClose: props.onClose,
    draggable: {
      type: Boolean,
      "default": true
    },
    viewerScale: {
      type: Object,
      "default": function _default() {
        return {};
      }
    },
    showOverlay: Boolean,
    closeBtn: props.closeBtn
  },
  setup: function setup(props2) {
    var classPrefix = usePrefixClass();
    var renderJSX = useTNodeJSX();
    var style = computed(function () {
      return {
        minWidth: props2.viewerScale.minWidth,
        minHeight: props2.viewerScale.minHeight
      };
    });
    return function () {
      return createVNode(Dialog, {
        "destroyOnClose": true,
        "attach": "body",
        "onClose": props2.onClose,
        "visible": props2.visible,
        "placement": "center",
        "mode": "modeless",
        "width": 1e3,
        "cancelBtn": null,
        "confirmBtn": null,
        "draggable": props2.draggable,
        "zIndex": props2.zIndex,
        "showOverlay": props2.showOverlay,
        "class": "".concat(classPrefix.value, "-image-viewer__dialog"),
        "header": renderJSX("title", ""),
        "footer": function footer() {
          return createVNode("div", {
            "class": "".concat(classPrefix.value, "-image-viewer-mini__footer")
          }, [createVNode(TImageViewerUtils, {
            "onZoomIn": props2.onZoomIn,
            "onZoomOut": props2.onZoomOut,
            "scale": props2.scale,
            "currentImage": props2.currentImage,
            "onRotate": props2.onRotate,
            "onMirror": props2.onMirror,
            "onReset": props2.onReset
          }, null)]);
        }
      }, {
        "default": function _default() {
          return [createVNode("div", {
            "class": "".concat(classPrefix.value, "-image-viewer-mini__content"),
            "style": style.value
          }, [createVNode(TImageItem, {
            "rotate": props2.rotate,
            "scale": props2.scale,
            "mirror": props2.mirror,
            "src": props2.currentImage.mainImage,
            "placementSrc": props2.currentImage.thumbnail
          }, null)])];
        }
      });
    };
  }
});

export { TImageViewerModal as default };
//# sourceMappingURL=ImageViewerModal.mjs.map
