"use strict";
const React = require("react");
const index$1 = require("../../icon/react-icon/IconLeft/index.js");
const index$2 = require("../../icon/react-icon/IconRight/index.js");
const index = require("../ConfigProvider/index.js");
const classNames = require("../_util/classNames.js");
const emotionReactJsxRuntime_browser_esm = require("../../../../../../@emotion_react@11.10.4_3toe27fv7etiytxb5kxc7fxaw4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");
function ImagePreviewArrow(props) {
  var _a, _b;
  var current = props.current, previewCount = props.previewCount, _c = props.infinite, infinite = _c === void 0 ? false : _c, onPrev = props.onPrev, onNext = props.onNext;
  var getPrefixCls = React.useContext(index.ConfigContext).getPrefixCls;
  var prefixCls = getPrefixCls("image-preview");
  var classNames$1 = classNames(prefixCls + "-arrow");
  var disableLeft = !infinite && current <= 0;
  var disableRight = !infinite && current >= previewCount - 1;
  return /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsxs("div", {
    className: classNames$1,
    children: [/* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx("div", {
      className: classNames(prefixCls + "-arrow-left", (_a = {}, _a[prefixCls + "-arrow-disabled"] = disableLeft, _a)),
      onClick: function(e) {
        e.preventDefault();
        !disableLeft && onPrev && onPrev();
      },
      children: /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(index$1, {})
    }), /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx("div", {
      className: classNames(prefixCls + "-arrow-right", (_b = {}, _b[prefixCls + "-arrow-disabled"] = disableRight, _b)),
      onClick: function(e) {
        e.preventDefault();
        !disableRight && onNext && onNext();
      },
      children: /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(index$2, {})
    })]
  });
}
module.exports = ImagePreviewArrow;
//# sourceMappingURL=image-preview-arrow.js.map
