"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _react = _interopRequireDefault(require("react"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var prefixCls = "home-page-guide-step";

function HomeGuideStepItem(_ref) {
  var step = _ref.step,
      title = _ref.title,
      linkName = _ref.linkName,
      _ref$isFinalStep = _ref.isFinalStep,
      isFinalStep = _ref$isFinalStep === void 0 ? false : _ref$isFinalStep,
      href = _ref.href;

  var openGuide = function openGuide() {
    window.open(href);
  };

  var openOkrPage = function openOkrPage() {
    window.open("".concat(window.location.href.split("#")[0], "#okr/manage"), "_self");
  };

  return /*#__PURE__*/_react["default"].createElement("div", {
    className: prefixCls
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefixCls, "__left")
  }, /*#__PURE__*/_react["default"].createElement("img", {
    className: "".concat(prefixCls, "__step-icon"),
    src: require("../../image/step".concat(step, ".png")),
    alt: ""
  }), !isFinalStep && /*#__PURE__*/_react["default"].createElement("img", {
    className: "".concat(prefixCls, "__arrow"),
    src: require("../../image/arrow.png")
  })), /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefixCls, "__right")
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefixCls, "__title"),
    onClick: openOkrPage
  }, title, /*#__PURE__*/_react["default"].createElement("i", {
    className: "tu-icon-APP-xi"
  })), /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefixCls, "__link"),
    onClick: openGuide
  }, /*#__PURE__*/_react["default"].createElement("img", {
    className: "".concat(prefixCls, "__video-icon"),
    src: require("../../image/video.png"),
    alt: ""
  }), /*#__PURE__*/_react["default"].createElement("span", null, linkName))));
}

var _default = HomeGuideStepItem;
exports["default"] = _default;