const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
const require_formatTime = require("../utils/formatTime.js");
let react = require("react");
react = require_runtime.__toESM(react);
//#region src/components/pisellDateTimeDisplay/components/TimeDisplay.tsx
/**
* 时间展示组件
*
* @description
* - 格式化并展示时间
* - 支持 12/24 小时制
* - 支持显示秒
* - 支持小时补零
*
* @example
* <TimeDisplay
*   time={dayjs()}
*   format={{ use12Hour: false, showSeconds: true }}
*   style={{ fontSize: 24, fontWeight: 600, color: '#000' }}
* />
*/
const TimeDisplay = ({ time, format, style, className }) => {
	const formattedTime = require_formatTime.formatTime(time, format);
	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.default.createElement("span", {
		className: `pisell-datetime-display-time ${className || ""}`.trim(),
		style: inlineStyle
	}, formattedTime);
};
//#endregion
exports.default = TimeDisplay;
