from django.db.models import TextChoices
from django.utils.translation import gettext_lazy as tr


class CredentialFormat(TextChoices):
    """
    Values must be compatible with upstream enum:
    webauthn.structs.AttestationFormat
    """
    Packed = 'packed', tr('Packed')
    TPM = 'tpm', tr('Trusted Platform Module')
    AndroidKey = 'android-key', tr('Android Key')
    AndroidSafetyNet = 'android-safetynet', tr('Android Safety Net')
    FidoU2F = 'fido-u2f', tr('Fido U2F')
    NONE = 'none', tr('None Specified')
    Yubikey = 'yubikey', tr('Yubikey')


class DeviceType(TextChoices):
    """
    Values must be compatible with upstream enum:
    webauthn.structs.CredentialDeviceType
    """
    SingleDevice = 'single_device', tr('Single Device')
    MultiDevice = 'multi_device', tr('Multi Device')
