import { createVNode as _createVNode } from "vue";
import { classNames } from "@antdv/pro-utils";
import { useConfigContextInject } from "ant-design-vue/lib/config-provider/context";
import { computed, defineComponent } from "vue";
import { useStyle } from "./style.mjs";
const GlobalFooter = defineComponent((props, {
  attrs,
  slots
}) => {
  const {
    getPrefixCls
  } = useConfigContextInject();
  const baseClassName = computed(() => getPrefixCls(props.prefixCls || "pro-global-footer"));
  const {
    wrapSSR,
    hashId
  } = 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(_createVNode("div", {
      "class": classNames(baseClassName.value, hashId.value, attrs.class || ""),
      "style": attrs.style
    }, [links && _createVNode("div", {
      "class": `${baseClassName.value}-list ${hashId.value}`.trim()
    }, [links.map((link) => _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 && _createVNode("div", {
      "class": `${baseClassName.value}-copyright ${hashId.value}`.trim()
    }, [copyright])]));
  };
}, {
  name: "GlobalFooter",
  slots: Object,
  inheritAttrs: false,
  props: ["links", "copyright", "prefixCls"]
});
export {
  GlobalFooter
};
