"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _jsxRuntime = require("react/jsx-runtime");
const GlobalFooter = ({
  className,
  prefixCls = 'ant-pro',
  links,
  copyright,
  style
}) => {
  if ((links == null || links === false || Array.isArray(links) && links.length === 0) && (copyright == null || copyright === false)) {
    return null;
  }
  const baseClassName = `${prefixCls}-global-footer`;
  const clsString = (0, _classnames.default)(baseClassName, className);
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("footer", {
    className: clsString,
    style: style,
    children: [links && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
      className: `${baseClassName}-links`,
      children: links.map(link => /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
        title: link.key,
        target: link.blankTarget ? '_blank' : '_self',
        href: link.href,
        rel: "noreferrer",
        children: link.title
      }, link.key))
    }), copyright && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
      className: `${baseClassName}-copyright`,
      children: copyright
    })]
  });
};
var _default = GlobalFooter;
exports.default = _default;