import { createVNode as _createVNode } from "vue";
import noFound from './noFound';
import serverError from './serverError';
import unauthorized, { UnauthorizedTitle } from './unauthorized';
import empty from './empty';
import noResult, { NoResultTitle } from './noResult';
import noNetwork, { NoNetworkTitle } from './noNetwork';
export var PfExceptionMap = {
  '404': noFound,
  '500': serverError,
  '403': unauthorized,
  empty: empty,
  noResult: noResult,
  noNetwork: noNetwork
};
var DefaultPfResultProps = {
  '404': {
    subTitle: '服务器查询不到信息'
  },
  '500': {
    subTitle: '非常抱歉，您访问的页面没有找到...'
  },
  '403': {
    title: _createVNode(UnauthorizedTitle, null, null),
    subTitle: '非常抱歉，您没有权限访问此页面...'
  },
  empty: {
    subTitle: '无数据'
  },
  noResult: {
    title: _createVNode(NoResultTitle, null, null),
    subTitle: '没有相关的搜索结果，换个关键字吧'
  },
  noNetwork: {
    title: _createVNode(NoNetworkTitle, null, null),
    subTitle: '该星球无信号，请检查网络连接！'
  }
};
var RenderPfResult = function RenderPfResult(prefixCls, _ref) {
  var status = _ref.status,
    title = _ref.title,
    subTitle = _ref.subTitle,
    extra = _ref.extra;
  var defaultProps = DefaultPfResultProps["".concat(status)];
  var _prefixCls = "".concat(prefixCls, "-pf");
  var SVGComponent = PfExceptionMap[status];
  var _title = title || (defaultProps === null || defaultProps === void 0 ? void 0 : defaultProps.title);
  var _subTitle = subTitle || (defaultProps === null || defaultProps === void 0 ? void 0 : defaultProps.subTitle);
  var _extra = extra || (defaultProps === null || defaultProps === void 0 ? void 0 : defaultProps.extra);
  console.log('_extra', _extra);
  return _createVNode("div", {
    "class": _prefixCls
  }, [_createVNode(SVGComponent, null, null), _createVNode("div", {
    "class": "".concat(_prefixCls, "-content")
  }, [_title && _createVNode("div", {
    "class": "".concat(_prefixCls, "-title"),
    "style": {
      marginBottom: _subTitle || _extra ? '16px' : '0'
    }
  }, [_title]), _subTitle && _createVNode("div", {
    "class": "".concat(_prefixCls, "-subtitle"),
    "style": {
      marginBottom: _extra ? '14px' : '0'
    }
  }, [_subTitle]), _extra && _createVNode("div", {
    "class": "".concat(_prefixCls, "-extra")
  }, [_extra])])]);
};
export default RenderPfResult;