import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { format } from "date-fns";
import { ConnectTooltip } from "../../tooltip/tooltip.js";
export function Timestamp(props) {
    const { timestampUtcMs: timestamp } = props;
    const timestampNumber = typeof timestamp === "string" && !timestamp.includes("-")
        ? parseInt(timestamp)
        : timestamp;
    const date = new Date(timestampNumber);
    const shortDate = format(date, "HH:mm 'UTC'");
    const longDate = format(date, "eee, dd MMM yyyy HH:mm:ss 'UTC'");
    const tooltipContent = _jsx("div", { children: longDate });
    return (_jsx(ConnectTooltip, { content: tooltipContent, children: _jsxs("span", { className: "cursor-pointer text-xs", children: ["committed at ", shortDate] }) }));
}
//# sourceMappingURL=timestamp.js.map