import { h } from "@stencil/core";
import { MapTerminalStatusToBadge } from "./terminals-status";
import { getAlternateTableCellPart, tableHeadCell } from "../../styles/parts";
import { capitalFirstLetter } from "../../utils/utils";
export const defaultColumnsKeys = 'nickname,provider_serial_number,status';
export const terminalTableColumns = {
    nickname: () => (h("th", { part: tableHeadCell, scope: "col", title: "The nickname associated with the terminal" }, "Nickname")),
    model_name: () => (h("th", { part: tableHeadCell, scope: "col", title: "The model name of the terminal" }, "Model Name")),
    id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The ID of the terminal" }, "ID")),
    provider: () => (h("th", { part: tableHeadCell, scope: "col", title: "The provider of the terminal" }, "Provider")),
    provider_serial_number: () => (h("th", { part: tableHeadCell, scope: "col", title: "The serial number of the terminal" }, "Serial Number")),
    device_id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The device/provider ID of the terminal" }, "Device ID")),
    sub_account_name: () => (h("th", { part: tableHeadCell, scope: "col", title: "The sub account associated with the terminal" }, "Sub Account")),
    status: () => (h("th", { part: tableHeadCell, scope: "col", title: "The current status of each terminal" }, "Status")),
};
export const terminalTableCells = {
    nickname: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.nickname)),
    model_name: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.model_name)),
    id: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.id)),
    provider: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, capitalFirstLetter(terminal.provider))),
    provider_serial_number: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.provider_serial_number)),
    device_id: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.provider_id)),
    sub_account_name: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.sub_account_name)),
    status: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, MapTerminalStatusToBadge(terminal.status))),
};
