import { formatDuration } from "../utils/formatDuration.js";
import React from "react";
//#region src/components/pisellTimeRangeDisplay/components/DurationBlock.tsx
/**
* 持续时长展示块（d h m s 或 天/时/分/秒，按 locale i18n）
*/
const DurationBlock = ({ durationMs, showSeconds = false, locale, style, className }) => {
	const formatted = formatDuration(durationMs, showSeconds, locale);
	const 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 ${className || ""}`.trim(),
		style: inlineStyle
	}, formatted);
};
//#endregion
export { DurationBlock as default };
