"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _vue = require("vue");

var _proLayout = require("@antd-vue/pro-layout");

function _isSlot(s) {
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
}

/**
 * 函数式组件
 * @param props
 * @param attrs
 * @param slots
 * @param emit
 * @constructor
 */
var GlobalFooter = function GlobalFooter(props, _ref) {
  var _slots$copyright, _slots$default;

  var attrs = _ref.attrs,
      slots = _ref.slots,
      emit = _ref.emit;
  var baseClassName = "".concat(props.prefixCls, "-global-footer");
  var copyright = ((_slots$copyright = slots.copyright) === null || _slots$copyright === void 0 ? void 0 : _slots$copyright.call(slots)) || props.copyright || '';
  return (0, _vue.createVNode)("footer", {
    "class": baseClassName
  }, [props.links && (0, _vue.createVNode)("div", {
    "class": "".concat(baseClassName, "-links")
  }, [props.links.map(function (link) {
    return (0, _vue.createVNode)("a", {
      "key": link.key,
      "title": link.key,
      "target": link.blankTarget ? '_self' : '_blank',
      "href": link.href
    }, [link.title]);
  })]), (0, _vue.createVNode)("div", {
    "class": "".concat(baseClassName, "-copyright")
  }, _isSlot(copyright) ? copyright : {
    default: function _default() {
      return [copyright];
    }
  }), (0, _vue.createVNode)("div", null, [(_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)])]);
};

GlobalFooter.displayName = 'GlobalFooter';
GlobalFooter.props = {
  links: {
    default: []
  },
  copyright: {
    default: (0, _vue.createVNode)(_proLayout.Copyright, null, null)
  },
  prefixCls: {
    default: 'ant-pro'
  }
};

GlobalFooter.install = function (app) {
  app.use(_proLayout.Copyright);
  app.component(GlobalFooter.displayName, GlobalFooter);
};

var _default2 = GlobalFooter;
exports.default = _default2;