import * as t from "react";
import x from "../../../@ant-design/icons/es/icons/CloseOutlined.mjs";
import P from "../../../@ant-design/icons/es/icons/LeftOutlined.mjs";
import b from "../../../@ant-design/icons/es/icons/RightOutlined.mjs";
import y from "../../../@ant-design/icons/es/icons/RotateLeftOutlined.mjs";
import E from "../../../@ant-design/icons/es/icons/RotateRightOutlined.mjs";
import p from "../../../@ant-design/icons/es/icons/SwapOutlined.mjs";
import I from "../../../@ant-design/icons/es/icons/ZoomInOutlined.mjs";
import h from "../../../@ant-design/icons/es/icons/ZoomOutOutlined.mjs";
import j from "../../../classnames/index.mjs";
import N from "../../../rc-image/es/Image.mjs";
import { useZIndex as S } from "../_util/hooks/useZIndex.mjs";
import { getTransitionName as c } from "../_util/motion.mjs";
import "../config-provider/index.mjs";
import R from "../config-provider/hooks/useCSSVarCls.mjs";
import z from "./style/index.mjs";
import { ConfigContext as T } from "../config-provider/context.mjs";
var _ = globalThis && globalThis.__rest || function(o, i) {
  var r = {};
  for (var e in o)
    Object.prototype.hasOwnProperty.call(o, e) && i.indexOf(e) < 0 && (r[e] = o[e]);
  if (o != null && typeof Object.getOwnPropertySymbols == "function")
    for (var n = 0, e = Object.getOwnPropertySymbols(o); n < e.length; n++)
      i.indexOf(e[n]) < 0 && Object.prototype.propertyIsEnumerable.call(o, e[n]) && (r[e[n]] = o[e[n]]);
  return r;
};
const G = {
  rotateLeft: /* @__PURE__ */ t.createElement(y, null),
  rotateRight: /* @__PURE__ */ t.createElement(E, null),
  zoomIn: /* @__PURE__ */ t.createElement(I, null),
  zoomOut: /* @__PURE__ */ t.createElement(h, null),
  close: /* @__PURE__ */ t.createElement(x, null),
  left: /* @__PURE__ */ t.createElement(P, null),
  right: /* @__PURE__ */ t.createElement(b, null),
  flipX: /* @__PURE__ */ t.createElement(p, null),
  flipY: /* @__PURE__ */ t.createElement(p, {
    rotate: 90
  })
}, L = (o) => {
  var {
    previewPrefixCls: i,
    preview: r
  } = o, e = _(o, ["previewPrefixCls", "preview"]);
  const {
    getPrefixCls: n
  } = t.useContext(T), m = n("image", i), u = `${m}-preview`, s = n(), f = R(m), [O, d, v] = z(m, f), [g] = S("ImagePreview", typeof r == "object" ? r.zIndex : void 0), C = t.useMemo(() => {
    var a;
    if (r === !1)
      return r;
    const l = typeof r == "object" ? r : {}, w = j(d, v, f, (a = l.rootClassName) !== null && a !== void 0 ? a : "");
    return Object.assign(Object.assign({}, l), {
      transitionName: c(s, "zoom", l.transitionName),
      maskTransitionName: c(s, "fade", l.maskTransitionName),
      rootClassName: w,
      zIndex: g
    });
  }, [r]);
  return O(/* @__PURE__ */ t.createElement(N.PreviewGroup, Object.assign({
    preview: C,
    previewPrefixCls: u,
    icons: G
  }, e)));
}, U = L;
export {
  U as default,
  G as icons
};
