import React__default from 'react';
import { formatCurrency } from '@jobber/formatters';
import classnames from 'classnames';

var styles$1 = {"table":"_7PagpWEko2U-","row":"_9OHT36DJGCo-","header":"YPDzOWGHgkk-","footer":"cv4Izfe0MWI-","spinning":"SBtILBzIaGI-"};

function Table({ children }) {
    return React__default.createElement("table", { className: styles$1.table }, children);
}

function Row({ children }) {
    return React__default.createElement("tr", { className: styles$1.row }, children);
}

var styles = {"cell":"EJeK329S0z0-","left":"WUrWSkqXHM4-","center":"Zt8BVgeQWjA-","right":"D-xShQGl-Us-","numeric":"kX0wxCTtfyc-","spinning":"ITB007fAKH8-"};

function Cell({ children, align = "left" }) {
    const className = classnames(styles.cell, styles[align]);
    return React__default.createElement("td", { className: className }, children);
}

function CellNumeric({ value }) {
    return (React__default.createElement(Cell, { align: "right" },
        React__default.createElement("span", { className: styles.numeric }, value.toString())));
}

function CellCurrency({ value, currency = undefined, }) {
    return React__default.createElement(CellNumeric, { value: formatCurrency(value, currency) });
}

function Header({ children }) {
    return (React__default.createElement("thead", { className: styles$1.header },
        React__default.createElement(Row, null, children)));
}

function Footer({ children }) {
    return (React__default.createElement("tfoot", { className: styles$1.footer },
        React__default.createElement(Row, null, children)));
}

function Body({ children }) {
    return React__default.createElement("tbody", null, children);
}

export { Body as B, Cell as C, Footer as F, Header as H, Row as R, Table as T, CellNumeric as a, CellCurrency as b };
