import _extends from "@babel/runtime/helpers/extends";
import * as React from 'react';
import { cnCreate } from '@megafon/ui-helpers';
import "./PartnersItem.css";
var cn = cnCreate('mfui-9-partners-item');
var PartnersItem = function PartnersItem(_ref) {
  var src = _ref.src,
    rel = _ref.rel,
    alt = _ref.alt,
    href = _ref.href,
    className = _ref.className,
    background = _ref.background,
    dataAttrs = _ref.dataAttrs;
  var RootElement = href ? 'a' : 'div';
  var isLink = !!href;
  return /*#__PURE__*/React.createElement(RootElement, _extends({
    href: isLink ? href : undefined,
    rel: isLink ? rel : undefined,
    className: cn({
      background: background,
      interactive: !!href
    }, [className])
  }, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), /*#__PURE__*/React.createElement("div", {
    className: cn('inner')
  }, /*#__PURE__*/React.createElement("div", {
    className: cn('img-wrapper')
  }, /*#__PURE__*/React.createElement("img", {
    src: src,
    alt: alt,
    className: cn('img')
  }))));
};
export default PartnersItem;