'use strict';

var React = require('react');
var formatters = require('@jobber/formatters');
var classnames = require('classnames');

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

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

function Row({ children }) {
    return React.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.createElement("td", { className: className }, children);
}

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

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

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

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

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

exports.Body = Body;
exports.Cell = Cell;
exports.CellCurrency = CellCurrency;
exports.CellNumeric = CellNumeric;
exports.Footer = Footer;
exports.Header = Header;
exports.Row = Row;
exports.Table = Table;
