import { formatCurrency } from "../utils/utils";
;
export var PayoutStatuses;
(function (PayoutStatuses) {
    PayoutStatuses["paid"] = "paid";
    PayoutStatuses["failed"] = "failed";
    PayoutStatuses["forwarded"] = "forwarded";
    PayoutStatuses["scheduled"] = "scheduled";
    PayoutStatuses["in_transit"] = "in_transit";
    PayoutStatuses["canceled"] = "canceled";
})(PayoutStatuses || (PayoutStatuses = {}));
export var PayoutStatusesSafeNames;
(function (PayoutStatusesSafeNames) {
    PayoutStatusesSafeNames["paid"] = "Paid";
    PayoutStatusesSafeNames["failed"] = "Failed";
    PayoutStatusesSafeNames["forwarded"] = "Forwarded";
    PayoutStatusesSafeNames["scheduled"] = "Scheduled";
    PayoutStatusesSafeNames["in_transit"] = "In Transit";
    PayoutStatusesSafeNames["canceled"] = "Canceled";
})(PayoutStatusesSafeNames || (PayoutStatusesSafeNames = {}));
export class Payout {
    constructor(payout) {
        this.id = payout.id;
        this.account_id = payout.account_id;
        this.currency = payout.currency;
        this.amount = payout.amount;
        this.bank_account = payout.bank_account;
        this.delivery_method = payout.delivery_method || 'standard';
        this.description = payout.description;
        this.deposits_at = payout.deposits_at;
        this.fees_total = payout.fees_total;
        this.refunds_count = payout.refunds_count;
        this.refunds_total = payout.refunds_total;
        this.payments_count = payout.payments_count;
        this.payments_total = payout.payments_total;
        this.payout_type = payout.payout_type;
        this.other_total = payout.other_total;
        this.status = payout.status;
        this.metadata = payout.metadata;
        this.created_at = payout.created_at;
        this.updated_at = payout.updated_at;
        this.settlement_priority = payout.settlement_priority || 'standard';
    }
    formattedPaymentAmount(amount) {
        return formatCurrency(amount, this.currency);
    }
}
