import I from "../../../classnames/index.mjs";
import * as o from "react";
import "../config-provider/index.mjs";
import P from "./empty.mjs";
import h from "./simple.mjs";
import _ from "./style/index.mjs";
import { ConfigContext as j } from "../config-provider/context.mjs";
import $ from "../locale/useLocale.mjs";
var D = globalThis && globalThis.__rest || function(l, m) {
  var a = {};
  for (var e in l)
    Object.prototype.hasOwnProperty.call(l, e) && m.indexOf(e) < 0 && (a[e] = l[e]);
  if (l != null && typeof Object.getOwnPropertySymbols == "function")
    for (var t = 0, e = Object.getOwnPropertySymbols(l); t < e.length; t++)
      m.indexOf(e[t]) < 0 && Object.prototype.propertyIsEnumerable.call(l, e[t]) && (a[e[t]] = l[e[t]]);
  return a;
};
const d = /* @__PURE__ */ o.createElement(P, null), E = /* @__PURE__ */ o.createElement(h, null), n = (l) => {
  var {
    className: m,
    rootClassName: a,
    prefixCls: e,
    image: t = d,
    description: f,
    children: y,
    imageStyle: g,
    style: u
  } = l, v = D(l, ["className", "rootClassName", "prefixCls", "image", "description", "children", "imageStyle", "style"]);
  const {
    getPrefixCls: N,
    direction: O,
    empty: s
  } = o.useContext(j), r = N("empty", e), [b, C, S] = _(r), [c] = $("Empty"), i = typeof f < "u" ? f : c == null ? void 0 : c.description, x = typeof i == "string" ? i : "empty";
  let p = null;
  return typeof t == "string" ? p = /* @__PURE__ */ o.createElement("img", {
    alt: x,
    src: t
  }) : p = t, b(/* @__PURE__ */ o.createElement("div", Object.assign({
    className: I(C, S, r, s == null ? void 0 : s.className, {
      [`${r}-normal`]: t === E,
      [`${r}-rtl`]: O === "rtl"
    }, m, a),
    style: Object.assign(Object.assign({}, s == null ? void 0 : s.style), u)
  }, v), /* @__PURE__ */ o.createElement("div", {
    className: `${r}-image`,
    style: g
  }, p), i && /* @__PURE__ */ o.createElement("div", {
    className: `${r}-description`
  }, i), y && /* @__PURE__ */ o.createElement("div", {
    className: `${r}-footer`
  }, y)));
};
n.PRESENTED_IMAGE_DEFAULT = d;
n.PRESENTED_IMAGE_SIMPLE = E;
process.env.NODE_ENV !== "production" && (n.displayName = "Empty");
const G = n;
export {
  G as default
};
