from django.utils.translation import gettext_lazy as _
from ocyan.core.fender import config

APP_CODE = "invoice"

FIRST_PAYMENT_CODE = "payment"
SECOND_PAYMENT_CODE = "second_payment"
THIRD_PAYMENT_CODE = "third_payment"
FOURTH_PAYMENT_CODE = "fourth_payment"

PRETTY_PAYMENT_METHOD_NAMES = {
    FIRST_PAYMENT_CODE: _("Invoice payment"),
    SECOND_PAYMENT_CODE: _("Second invoice payment"),
    THIRD_PAYMENT_CODE: _("Third invoice payment"),
    FOURTH_PAYMENT_CODE: _("Fourth invoice payment")
}

AVAILABLE_PAYMENT_METHODS = [FIRST_PAYMENT_CODE]

if config.get("ocyan_invoice_payment_plugin", SECOND_PAYMENT_CODE, False):
    AVAILABLE_PAYMENT_METHODS.append(SECOND_PAYMENT_CODE)
    
if config.get("ocyan_invoice_payment_plugin", THIRD_PAYMENT_CODE, False):
    AVAILABLE_PAYMENT_METHODS.append(THIRD_PAYMENT_CODE)
    
if config.get("ocyan_invoice_payment_plugin", FOURTH_PAYMENT_CODE, False):
    AVAILABLE_PAYMENT_METHODS.append(FOURTH_PAYMENT_CODE)
