//
// Copyright 2025 DXOS.org
//
import React from 'react';
export var Unit;
(function (Unit) {
    Unit.KB = (n) => ((n ?? 0) / 1_000).toFixed(2);
})(Unit || (Unit = {}));
export const Table = ({ rows }) => {
    return (React.createElement("div", { className: 'is-full text-xs font-mono' }, rows.map(([prefix, label, value, unit], i) => (React.createElement("div", { key: i, className: 'grid grid-cols-[1rem_2fr_1fr_3rem]' },
        React.createElement("div", { className: 'p-1 text-subdued' }, prefix),
        React.createElement("div", { className: 'p-1 truncate' }, label),
        React.createElement("div", { className: 'p-1 text-right' }, value),
        React.createElement("div", { className: 'p-1 text-subdued' }, unit))))));
};
//# sourceMappingURL=Table.js.map