@using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver; @using Newtonsoft.Json @model Auth; @{ var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string; var logo = _logoOpt.Value; ViewData["Title"] = _localizer[WebKey.DocProtected]; var userCulture = ViewData["UserCulture"] as Culture; string codeType = ViewData["CodeType"] is string _codeType ? _codeType : "accessCode"; string codePropName = char.ToUpper(codeType[0]) + codeType.Substring(1); string codeKeyName = codePropName.Replace("Code", ""); bool viaSms = codeType == "smsCode"; bool viaAuthenticator = codeType == "authenticatorCode"; bool viaTFA = viaSms || viaAuthenticator; DateTime? smsExpiration = ViewData["SmsExpiration"] is DateTime _smsExpiration ? _smsExpiration : null; DateTime? qrCodeExpiration = ViewData["QRCodeExpiration"] is DateTime _qrCodeExpiration ? _qrCodeExpiration : null; bool tfaEnabled = ViewData["TFAEnabled"] is bool _tfaEnabled && _tfaEnabled; bool hasPhoneNumber = ViewData["HasPhoneNumber"] is bool _hasPhoneNumber && _hasPhoneNumber; }

@_localizer[WebKey.Formats.LockedTitle.Format(codeKeyName)]

@_localizer[WebKey.Formats.LockedBody.Format(codeKeyName)].Value.Format(qrCodeExpiration.ToString())

@if (tfaEnabled) {
@if(hasPhoneNumber) { } else { }
} @if (smsExpiration is not null) { }
@if (ViewData["ErrorMessage"] is string errMsg) { }
@_localizer[WebKey.Formats.LockedFooterTitle.Format(codeKeyName)]

@_localizer[WebKey.Formats.LockedFooterBody.Format(codeKeyName)]