from collections import OrderedDict

from .. import CreditCard
from .. import Provider as CreditCardProvider


class Provider(CreditCardProvider):
    """Implementation of ``pt_PT`` locale credit card

    For all methods that take ``card_type`` as an argument a random card type
    will be used if the supplied value is ``None``. The list of valid card types
    includes ``'visa'``, ``'mastercard'`` and ``'maestro'``.

    Source: https://bincheck.org/portugal
    """

    prefix_visa = [
        "400131",
        "400190",
        "400817",
        "402192",
        "402947",
        "402956",
        "403005",
        "403006",
        "403007",
        "403008",
        "403271",
        "404520",
        "404530",
        "405758",
        "406170",
        "406475",
        "407548",
        "407549",
        "407575",
        "408237",
        "408239",
        "409842",
        "409843",
        "410000",
        "410344",
        "410345",
        "410553",
        "410557",
        "411635",
        "411700",
        "411701",
        "411869",
        "412487",
        "412488",
        "412489",
        "412657",
        "412782",
        "412990",
        "413014",
        "413793",
        "413871",
        "415158",
        "415159",
        "415170",
        "415171",
        "415174",
        "415175",
        "415194",