//
// Copyright 2025 DXOS.org
//
export const formatDuration = (duration) => {
    return `${(duration / 1000).toFixed(2)}`;
};
/**
 * Extracts the UUID part from a DXN.
 * @param dxn The DXN to extract the UUID from.
 * @returns The UUID part of the DXN, or undefined if the DXN is undefined or invalid.
 */
export const getUuidFromDxn = (dxn) => {
    if (!dxn) {
        return undefined;
    }
    const dxnString = dxn.toString();
    const dxnParts = dxnString.split(':');
    return dxnParts.at(-1);
};
//# sourceMappingURL=utils.js.map