{{ 'SETTINGS_MENU.BILLING' | translate }}

@if (billingEnabled === false) {

{{ 'SETTINGS_MENU.BILLING_NOT_CONFIGURED' | translate }}

} @if (billingEnabled && loadFailed && !loading) {

{{ 'SETTINGS_MENU.BILLING_LOAD_FAILED' | translate }}

} @if (billingEnabled) {
{{ 'SETTINGS_MENU.BILLING_CURRENT_PLAN' | translate }}
@if (subscription) {
{{ 'SETTINGS_MENU.BILLING_PLAN' | translate }} {{ subscription.planName }}
{{ 'SETTINGS_MENU.BILLING_STATUS' | translate }} {{ subscription.status }}
{{ 'SETTINGS_MENU.BILLING_PRICE' | translate }} {{ formatAmount(subscription.amount, subscription.currency) }}{{ intervalSuffix(subscription.interval) }}
@if (subscription.trialEndsAt) {
{{ 'SETTINGS_MENU.BILLING_TRIAL_ENDS' | translate }} {{ subscription.trialEndsAt | date: 'mediumDate' }}
} @if (subscription.renewsAt) {
{{ (subscription.cancelAtPeriodEnd ? 'SETTINGS_MENU.BILLING_ENDS_ON' : 'SETTINGS_MENU.BILLING_RENEWS_ON' ) | translate }} {{ subscription.renewsAt | date: 'mediumDate' }}
} @if (subscription.cancelAtPeriodEnd) {

{{ 'SETTINGS_MENU.BILLING_CANCEL_PENDING' | translate }}

} @if (!subscription.cancelAtPeriodEnd) {
}
} @else {

{{ 'SETTINGS_MENU.BILLING_NO_SUBSCRIPTION' | translate }}

}
@if (plans?.length) {
{{ 'SETTINGS_MENU.BILLING_AVAILABLE_PLANS' | translate }}
@for (plan of plans; track plan) {
{{ plan.productName }}
{{ formatAmount(plan.amount, plan.currency) }}{{ intervalSuffix(plan.interval) }}
}
}
{{ 'SETTINGS_MENU.BILLING_PAYMENT_METHOD' | translate }}
@if (paymentMethod) {

{{ paymentMethod.brand | titlecase }} •••• {{ paymentMethod.last4 }} @if (paymentMethod.expMonth) { ({{ paymentMethod.expMonth }}/{{ paymentMethod.expYear }}) }

} @else {

{{ 'SETTINGS_MENU.BILLING_NO_CARD' | translate }}

}
@if (invoices?.length) {
{{ 'SETTINGS_MENU.BILLING_INVOICES' | translate }}
@for (invoice of invoices; track invoice) { }
{{ 'SETTINGS_MENU.BILLING_INVOICE_DATE' | translate }} {{ 'SETTINGS_MENU.BILLING_INVOICE_NUMBER' | translate }} {{ 'SETTINGS_MENU.BILLING_STATUS' | translate }} {{ 'SETTINGS_MENU.BILLING_INVOICE_AMOUNT' | translate }}
{{ invoice.createdAt | date: 'mediumDate' }} {{ invoice.number || '—' }} {{ invoice.status || '—' }} {{ formatAmount(invoiceAmount(invoice), invoice.currency) }} @if (invoice.hostedInvoiceUrl) { {{ 'SETTINGS_MENU.BILLING_VIEW_INVOICE' | translate }} }
}
{{ 'SETTINGS_MENU.BILLING_PORTAL' | translate }}

{{ 'SETTINGS_MENU.BILLING_PORTAL_HINT' | translate }}

}