function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
import React from 'react';
import classNames from 'classnames';
import PisellSectionHeaders from "../pisellSectionHeaders";
import Iconfont from "../iconfont";
import "./index.less";
var prefixCls = 'pisell-header-progress-bar';
var PisellHeaderProgressBar = function PisellHeaderProgressBar(_ref) {
  var title = _ref.title,
    stepText = _ref.stepText,
    _ref$showBack = _ref.showBack,
    showBack = _ref$showBack === void 0 ? true : _ref$showBack,
    _ref$showClose = _ref.showClose,
    showClose = _ref$showClose === void 0 ? true : _ref$showClose,
    _ref$enableShadow = _ref.enableShadow,
    enableShadow = _ref$enableShadow === void 0 ? false : _ref$enableShadow,
    _ref$enableBorder = _ref.enableBorder,
    enableBorder = _ref$enableBorder === void 0 ? false : _ref$enableBorder,
    _ref$borderWidth = _ref.borderWidth,
    borderWidth = _ref$borderWidth === void 0 ? 1 : _ref$borderWidth,
    _ref$borderColor = _ref.borderColor,
    borderColor = _ref$borderColor === void 0 ? '#d0d5dd' : _ref$borderColor,
    _ref$backgroundColor = _ref.backgroundColor,
    backgroundColor = _ref$backgroundColor === void 0 ? '#FFFFFF' : _ref$backgroundColor,
    className = _ref.className,
    style = _ref.style,
    onBack = _ref.onBack,
    onClose = _ref.onClose;
  var classes = classNames(prefixCls, className);

  /**
   * @title: 左侧内容
   * @description:
   * @return {*}
   * @Author: WangHan
   * @Date: 2025-01-12 16:04
   */
  // const backNode = () => {
  //   return (

  //   );
  // };

  var customStyle = _objectSpread(_objectSpread({}, style), {}, {
    backgroundColor: backgroundColor,
    boxShadow: enableShadow ? '0px 1px 2px 0px rgba(16, 24, 40, 0.05)' : 'none',
    borderBottom: enableBorder ? "".concat(borderWidth, "px solid ").concat(borderColor) : 'none'
  });
  return /*#__PURE__*/React.createElement(PisellSectionHeaders, {
    backNode: showBack ? /*#__PURE__*/React.createElement(Iconfont, {
      className: "".concat(prefixCls, "-back-icon"),
      type: "pisell2-chevron-left"
    }) : null,
    centerNode: /*#__PURE__*/React.createElement("div", {
      className: "".concat(prefixCls, "-center")
    }, stepText ? /*#__PURE__*/React.createElement("div", {
      className: "step"
    }, stepText) : null, title ? /*#__PURE__*/React.createElement("div", {
      className: "select-text"
    }, title) : null),
    actionNode: showClose ? /*#__PURE__*/React.createElement(Iconfont, {
      type: "pisell2-x-close",
      className: "".concat(prefixCls, "-close-icon")
    }) : null,
    style: customStyle,
    className: classes,
    onAction: onClose,
    onBack: onBack
  });
};
export default PisellHeaderProgressBar;