import _Button from "@alifd/next/es/button";
import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
export default function linkRender(value, column, rowData, _onClick) {
  if (value === undefined || value === null) {
    return '';
  }
  var renderProps = {
    text: true,
    type: 'primary',
    className: "deep-table-link-button",
    title: typeof value == 'object' ? value.title : value,
    style: _extends({}, rowData.style || {}),
    onClick: function onClick() {
      _onClick && typeof _onClick === 'function' && _onClick();
      if (typeof value === 'object' && value.href) {
        location.href = value.href;
      } else if (typeof value == 'string') {
        location.href = value;
      }
    }
  };
  return /*#__PURE__*/React.createElement(_Button, renderProps, typeof value == 'object' ? value.title : value);
}
;