import React from "react";
import SkeletonThemeWrapper from "../../customization-cornor/skeletonCustomization";
export default class LinkBehaviour extends React.Component {
  constructor(props) {
    super(props);
    this.handlePreventDefault = this.handlePreventDefault.bind(this);
  }

  handlePreventDefault(e) {
    const {
      onClick
    } = this.props;
    e && e.preventDefault && e.preventDefault();
    e && e.stopPropagation && e.stopPropagation();
    e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation && e.nativeEvent.stopImmediatePropagation();
    onClick && onClick(e);
  }

  render() {
    const renderProps = {
      onHandlePreventDefault: this.handlePreventDefault
    };
    const {
      renderComponent,
      ...basicProps
    } = this.props;
    return /*#__PURE__*/React.createElement(SkeletonThemeWrapper, {
      basicProps: basicProps,
      renderProps: renderProps,
      component: renderComponent
    });
  }

}