'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
var iconsVue = require('@ant-design/icons-vue');
require('../../../vue-components/index.cjs');
var useConfigInject = require('../../config-provider/src/hooks/useConfigInject.cjs');
var index = require('../style/index.cjs');
var props = require('./props.cjs');
var transition = require('../../../vue-components/transition/src/transition.cjs');
var PreviewGroup = require('../../../vue-components/vc-image/src/PreviewGroup.cjs');

const icons = {
  rotateLeft: vue.createVNode(iconsVue.RotateLeftOutlined, null, null),
  rotateRight: vue.createVNode(iconsVue.RotateRightOutlined, null, null),
  zoomIn: vue.createVNode(iconsVue.ZoomInOutlined, null, null),
  zoomOut: vue.createVNode(iconsVue.ZoomOutOutlined, null, null),
  close: vue.createVNode(iconsVue.CloseOutlined, null, null),
  left: vue.createVNode(iconsVue.LeftOutlined, null, null),
  right: vue.createVNode(iconsVue.RightOutlined, null, null),
  flipX: vue.createVNode(iconsVue.SwapOutlined, null, null),
  flipY: vue.createVNode(iconsVue.SwapOutlined, {
    "rotate": 90
  }, null)
};
var AImagePreviewGroup = /* @__PURE__ */ vue.defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "AImagePreviewGroup",
  inheritAttrs: false,
  props: props.previewGroupProps(),
  setup(props, {
    attrs,
    slots
  }) {
    const {
      prefixCls,
      rootPrefixCls
    } = useConfigInject.default("image", props);
    const previewPrefixCls = vue.computed(() => `${prefixCls.value}-preview`);
    const [wrapSSR, hashId] = index.default(prefixCls);
    const mergedPreview = vue.computed(() => {
      const {
        preview
      } = props;
      if (preview === false)
        return preview;
      const _preview = typeof preview === "object" ? preview : {};
      return {
        ..._preview,
        rootClassName: hashId.value,
        transitionName: transition.getTransitionName(rootPrefixCls.value, "zoom", _preview.transitionName),
        maskTransitionName: transition.getTransitionName(rootPrefixCls.value, "fade", _preview.maskTransitionName)
      };
    });
    return () => {
      return wrapSSR(vue.createVNode(PreviewGroup.default, {
        ...attrs,
        ...props,
        "preview": mergedPreview.value,
        "icons": icons,
        "previewPrefixCls": previewPrefixCls.value
      }, slots));
    };
  }
});

exports.default = AImagePreviewGroup;
exports.icons = icons;
//# sourceMappingURL=PreviewGroup.cjs.map
