import { jsx as _jsx } from "react/jsx-runtime";
import { Text } from "ink";
export function shellTimeLabel(ms) {
    if (!Number.isFinite(ms) || ms < 0)
        return "0ms";
    if (ms < 1000)
        return `${Math.round(ms)}ms`;
    return `${(ms / 1000).toFixed(1)}s`;
}
export function ShellTimeDisplay(props) {
    return _jsx(Text, { color: "gray", children: shellTimeLabel(props.ms) });
}
