import React from 'react';
import { formatDuration } from "../utils";
/**
 * 持续时长展示块（d h m s 或 天/时/分/秒，按 locale i18n）
 */
export var DurationBlock = function DurationBlock(_ref) {
  var durationMs = _ref.durationMs,
    _ref$showSeconds = _ref.showSeconds,
    showSeconds = _ref$showSeconds === void 0 ? false : _ref$showSeconds,
    locale = _ref.locale,
    style = _ref.style,
    className = _ref.className;
  var formatted = formatDuration(durationMs, showSeconds, locale);
  var inlineStyle = {
    fontSize: style === null || style === void 0 ? void 0 : style.fontSize,
    fontWeight: style === null || style === void 0 ? void 0 : style.fontWeight,
    color: style === null || style === void 0 ? void 0 : style.color,
    lineHeight: style === null || style === void 0 ? void 0 : style.lineHeight
  };
  return /*#__PURE__*/React.createElement("span", {
    className: "pisell-time-range-display-duration ".concat(className || '').trim(),
    style: inlineStyle
  }, formatted);
};
export default DurationBlock;