var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var stdin_exports = {};
__export(stdin_exports, {
  GlobalFooter: () => GlobalFooter
});
module.exports = __toCommonJS(stdin_exports);
var import_vue = require("vue");
var import_pro_utils = require("@antdv/pro-utils");
var import_context = require("ant-design-vue/lib/config-provider/context");
var import_vue2 = require("vue");
var import_style = require("./style");
const GlobalFooter = (0, import_vue2.defineComponent)((props, {
  attrs,
  slots
}) => {
  const {
    getPrefixCls
  } = (0, import_context.useConfigContextInject)();
  const baseClassName = (0, import_vue2.computed)(() => getPrefixCls(props.prefixCls || "pro-global-footer"));
  const {
    wrapSSR,
    hashId
  } = (0, import_style.useStyle)(baseClassName);
  return () => {
    var _a;
    const {
      links,
      copyright = (_a = slots.copyright) == null ? void 0 : _a.call(slots)
    } = props;
    if ((links == null || links === false || Array.isArray(links) && links.length === 0) && (copyright == null || copyright === false)) {
      return null;
    }
    return wrapSSR((0, import_vue.createVNode)("div", {
      "class": (0, import_pro_utils.classNames)(baseClassName.value, hashId.value, attrs.class || ""),
      "style": attrs.style
    }, [links && (0, import_vue.createVNode)("div", {
      "class": `${baseClassName.value}-list ${hashId.value}`.trim()
    }, [links.map((link) => (0, import_vue.createVNode)("a", {
      "class": `${baseClassName.value}-list-link ${hashId.value}`.trim(),
      "key": link.key,
      "title": link.key,
      "target": link.blankTarget ? "_blank" : "_self",
      "href": link.href,
      "rel": "noreferrer"
    }, [link.title]))]), copyright && (0, import_vue.createVNode)("div", {
      "class": `${baseClassName.value}-copyright ${hashId.value}`.trim()
    }, [copyright])]));
  };
}, {
  name: "GlobalFooter",
  slots: Object,
  inheritAttrs: false,
  props: ["links", "copyright", "prefixCls"]
});
