import { h } from "@stencil/core";
import { convertToLocal } from "../../utils/utils";
import { getAlternateTableCellPart, tableHeadCell } from "../../styles/parts";
export const defaultColumnsKeys = 'created_at,txn_type,description,amount,fee,net';
export const payoutTransactionTableColumns = {
    id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The unique identifier of each transaction" }, "ID")),
    account_id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The unique identifier of the account associated with each transaction" }, "Account ID")),
    payout_id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The unique identifier of the payout associated with each transaction" }, "Payout ID")),
    financial_transaction_id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The unique identifier of the financial transaction associated with the payment balance transaction" }, "Financial Transaction ID")),
    amount: () => (h("th", { part: tableHeadCell, scope: "col", title: "The dollar amount of each transaction" }, "Amount")),
    fee: () => (h("th", { part: tableHeadCell, scope: "col", title: "The fee associated with each transaction" }, "Fee")),
    net: () => (h("th", { part: tableHeadCell, scope: "col", title: "The net amount of each transaction" }, "Net")),
    currency: () => (h("th", { part: tableHeadCell, scope: "col", title: "The currency of each transaction" }, "Currency")),
    description: () => (h("th", { part: tableHeadCell, scope: "col", title: "The description of each transaction" }, "Description")),
    source_id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The unique identifier of the source object associated with the payment balance transaction" }, "Source ID")),
    txn_type: () => (h("th", { part: tableHeadCell, scope: "col", title: "The type of each transaction" }, "Type")),
    created_at: () => (h("th", { part: tableHeadCell, scope: "col", title: "The date and time each transaction was made" }, "Processed On")),
    available_on: () => (h("th", { part: tableHeadCell, scope: "col", title: "The date and time each transaction will be available" }, "Available On")),
    updated_at: () => (h("th", { part: tableHeadCell, scope: "col", title: "The date and time each transaction was last updated" }, "Updated On")),
};
export const payoutTransactionTypes = {
    fee: "Fee",
    payment: "Payment",
    payout: "Payout",
    seller_payment_refund: "Seller Payment Refund",
    dispute_amount_collected: "Dispute Amount Collected",
    dispute_fee_collected: "Dispute Fee Collected",
    seller_payment: "Seller Payment",
    transfer: "Transfer",
    partner_platform_proceeds_credit: "Partner Platform Proceeds Credit",
    processing_fee: "Processing Fee",
    refund_processing_fee: "Refund Processing Fee",
    fee_rounding_adjustment: "Fee Rounding Adjustment",
    platform_fee: "Platform Fee",
    processing_fee_return: "Processing Fee Return",
    platform_fee_return: "Platform Fee Return"
};
export const payoutTransactionTableCells = {
    id: (transaction) => (h("td", { part: getAlternateTableCellPart(transaction.id) }, transaction.id)),
    account_id: (transaction) => (h("td", { part: getAlternateTableCellPart(transaction.account_id) }, transaction.account_id)),
    payout_id: (transaction) => (h("td", { part: getAlternateTableCellPart(transaction.payout_id) }, transaction.payout_id)),
    financial_transaction_id: (transaction) => (h("td", { part: getAlternateTableCellPart(transaction.financial_transaction_id) }, transaction.financial_transaction_id)),
    amount: (transaction) => (h("td", { part: getAlternateTableCellPart(transaction.amount) }, transaction.formattedPaymentAmount(transaction.amount))),
    fee: (transaction) => (h("td", { part: getAlternateTableCellPart(transaction.fee) }, transaction.formattedPaymentAmount(transaction.fee))),
    net: (transaction) => (h("td", { part: getAlternateTableCellPart(transaction.net) }, transaction.formattedPaymentAmount(transaction.net))),
    currency: (transaction) => (h("td", { part: getAlternateTableCellPart(transaction.currency) }, transaction.currency)),
    description: (transaction) => (h("td", { part: getAlternateTableCellPart(transaction.description) }, transaction.description)),
    source_id: (transaction) => (h("td", { part: getAlternateTableCellPart(transaction.source_id) }, transaction.source_id)),
    txn_type: (transaction) => (h("td", { part: getAlternateTableCellPart(transaction.txn_type) }, payoutTransactionTypes[transaction.txn_type])),
    created_at: (transaction) => (h("td", { part: getAlternateTableCellPart(transaction.created_at) }, h("div", { class: "fw-bold" }, convertToLocal(transaction.created_at, { showDisplayDate: true })), h("div", { class: "fw-bold" }, convertToLocal(transaction.created_at, { showTime: true })))),
    available_on: (transaction) => (h("td", { part: getAlternateTableCellPart(transaction.available_on) }, h("div", { class: "fw-bold" }, convertToLocal(transaction.available_on, { showDisplayDate: true })), h("div", { class: "fw-bold" }, convertToLocal(transaction.available_on, { showTime: true })))),
    updated_at: (transaction) => (h("td", { part: getAlternateTableCellPart(transaction.updated_at) }, h("div", { class: "fw-bold" }, convertToLocal(transaction.updated_at, { showDisplayDate: true })), h("div", { class: "fw-bold" }, convertToLocal(transaction.updated_at, { showTime: true })))),
};
