MDCAppStoreV2PurchaseConfirmOrderPaymentMethodSelectorCVVEntryRow.react",["fbt","FBPayCometAuthAPIUtils","FBPayECPStrings","FBPayLoggingUtils","MCDSText.react","MCDSTextInput.react","MDCAppStoreArvrPaymentMethodUtils","MDCAppStoreOculusEngagementEventsLoggingHooks","MDCAppStoreV2PurchaseConfirmOrderPaymentMethodSelectorCVVEntryRow_order.graphql","asyncToGeneratorRuntime","err","gkx","react","react-relay"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k=j||(j=d("react"));a=j;var l=a.useCallback,m=a.useEffect,n=a.useMemo,o=a.useState;q.displayName="MDCAppStoreV2PurchaseConfirmOrderPaymentMethodSelectorCVVEntryRow";function p(a){return a==null||a.trim()===""}function q(a){var e=a.isCvvVerificationRequired,f=a.onCvvVerifyStatusChange,g=a.orderRef;a=a.shouldShowCvvEntryField;var j=i!==void 0?i:i=b("MDCAppStoreV2PurchaseConfirmOrderPaymentMethodSelectorCVVEntryRow_order.graphql"),r=d("react-relay").useFragment(j,g),s=n(function(){return d("FBPayLoggingUtils").sessionIDGenerator()},[]),t=(g=r==null?void 0:(j=r.payment_method)==null?void 0:j.id)!=null?g:"";j=o("");var u=j[0],v=j[1];g=o(null);j=g[0];var w=g[1];g=o(!1);var x=g[0],y=g[1];g=o(c("MDCAppStoreArvrPaymentMethodUtils").getCardTypeFromGraphQLType(r==null?void 0:(g=r.payment_method)==null?void 0:g.card_type).cscDigits);var z=g[0],A=g[1],B=d("FBPayCometAuthAPIUtils").usePaymentsCometVerifyAuthFactor(!0),C="VALID",D="MOR_OCULUS_LAUNCH_V2",E="CREATE_AUTH_TICKET_BASED_FACTOR";g=(g=q.displayName)!=null?g:"StorePurchasePaymentMethodCvvEntryRow";var F=d("MDCAppStoreOculusEngagementEventsLoggingHooks").useEventLogging(g),G=d("MDCAppStoreOculusEngagementEventsLoggingHooks").useErrorLogging(g),H=d("FBPayECPStrings").ERROR_COULDNT_VERIFY_CVV;m(function(){var a;v("");y(!1);w(null);A(c("MDCAppStoreArvrPaymentMethodUtils").getCardTypeFromGraphQLType(r==null?void 0:(a=r.payment_method)==null?void 0:a.card_type).cscDigits)},[r==null?void 0:r.payment_method]);var I=l(function(a){F("SUBMIT_CVV_ATTEMPT");w(null);y(!0);if(p(a)||p(t)){G("SUBMIT_CVV_ERROR");w(c("err")(H.toString()));y(!1);return}F("VERIFY_PLATFORM_TRUST_TOKEN_ATTEMPT");B([E],{authFactorType:"CSC",credID:t},D,s,a,null,function(a,b){F("VERIFY_PLATFORM_TRUST_TOKEN_SUCCESS");a=b==null?void 0:(a=b.fbpay_auth_factor_verification)==null?void 0:(b=a.authentication_ticket)==null?void 0:b.auth_ticket_status;y(!1);String(a)===C?f(!0):(G("VERIFY_PLATFORM_TRUST_TOKEN_ERROR"),w(c("err")(H.toString())),y(!1))},function(a){G("VERIFY_PLATFORM_TRUST_TOKEN_ERROR"),w(c("err")(H.toString())),y(!1)},null,null,null,null);F("SUBMIT_CVV_SUCCESS")},[t,G,F,s,B,f,H]),J=l(function(){var a=b("asyncToGeneratorRuntime").asyncToGenerator(function*(a){a.length<=z&&v(a),a.length===z&&(yield I(a))});return function(b){return a.apply(this,arguments)}}(),[z,I]);if(!c("gkx")("3172"))return null;g=z===c("MDCAppStoreArvrPaymentMethodUtils").getMaxCSCLength()?h._(/*BTDS*/"1234"):h._(/*BTDS*/"123");return!e||a?null:k.jsx(c("MCDSTextInput.react"),{"data-testid":void 0,errorMessage:j?k.jsx(c("MCDSText.react"),{children:H}):null,inputMode:"numberCompact",isDisabled:x===!0,isLoading:x,label:h._(/*BTDS*/"CVV"),maxLength:z,placeholder:g,type:"number",value:u,onSubmit:function(){void I(u)},onValueChange:function(a){void J(a)}})}q.displayName=q.name+" [from "+f.id+"]";g["default"]=q}),226);
-----
MDCAppStoreV2PurchaseConfirmOrderPaymentMethodSelectorCVVEntryRow_order.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"MDCAppStoreV2PurchaseConfirmOrderPaymentMethodSelectorCVVEntryRow_order",selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"payment_method",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"card_type",storageKey:null}],type:"ExternalCreditCard",abstractKey:null}],storageKey:null}],type:"Order",abstractKey:null};e.exports=a}),null);
-----