import * as React from 'react';
import { useEffect } from 'react';
var _Next = Next,
  Icon = _Next.Icon;
var ICON_URL = '//at.alicdn.com/t/a/font_2761185_ccl8ob63gmj.js';
var CustomIcon;
document.addEventListener('DOMContentLoaded', function () {
  // console.log('3 seconds passed');
  CustomIcon = Icon.createFromIconfontCN({
    scriptUrl: ICON_URL
  });
});
export default (function (props) {
  var type = props.type,
    size = props.size,
    _props$className = props.className,
    className = _props$className === void 0 ? '' : _props$className,
    _props$style = props.style,
    style = _props$style === void 0 ? {} : _props$style;
  useEffect(function () {
    if (!CustomIcon) {
      CustomIcon = Icon.createFromIconfontCN({
        scriptUrl: ICON_URL
      });
    }
  }, []);
  return /*#__PURE__*/React.createElement(React.Fragment, null, CustomIcon && /*#__PURE__*/React.createElement(CustomIcon, {
    type: type,
    size: size,
    className: className,
    style: style
  }));
});