IGPayHubSubscriptionsSurveyButtonDialog.react",["fbt","CometColumn.react","CometColumnItem.react","CometLink.react","DCPSurveyBenefitsImprovementFlow.react","DCPSurveyChangeProfileFlow.react","DCPSurveyChangeSubscriptionFlow.react","DCPSurveyConstants","DCPSurveyFeedbackFlow.react","DCPSurveyThankYouScreen.react","DigitalCommerceLoggingContext","FDSDialog.react","FDSDialogFooter.react","FDSDialogHeader.react","FDSFormCombobox.react","FDSText.react","IGPayHubDigitalSubscriptionCancelButtonDialog.react","emptyFunction","react","usePaymentsCometSubmitSubscriptionSurveyMutation"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react"));b=i;var k=b.useContext,l=b.useState,m={};function a(a){var b=a.dialogData;b=b===void 0?m:b;var e=a.onClose,f=e===void 0?c("emptyFunction"):e;e=a.onSubmit;var g=e===void 0?c("emptyFunction"):e,i=a.selectedEntitlementID,n={dcp_flow:"cancel_subscription",dcp_platform:70,dcp_sub_flow:"payment",entitlement_id:i!=null?i:""};e=l(!1);a=e[0];var o=e[1],p=!1;e=k(c("DigitalCommerceLoggingContext"));var q=e.logger,r=c("usePaymentsCometSubmitSubscriptionSurveyMutation")();e=function(){q.logUserClickDcpCancelSurveyBack(babelHelpers["extends"]({},n,{target_name:"subscriptions"})),u(!0),w(!1),y(!1),J.reset(),p&&g(),f()};var s=l(!0),t=s[0],u=s[1];s=l(!1);var v=s[0],w=s[1];s=l(b._testInitialShowCancelDialog==="true"||b._testInitialShowCancelDialog==="true"||!1);var x=s[0],y=s[1];s=l("");var z=s[0],A=s[1];s=l(null);var B=s[0],C=s[1];s=l(null);var D=s[0],E=s[1];s=l(null);var F=s[0],G=s[1];s=l(null);var H=s[0],I=s[1],J={reset:function(){A(""),C(null),E(null),G(null),I(null)},setBenefitsImprovement:G,setFeedbackText:A,setIsLoading:o,setProfileChange:I,setSelectedChange:E,setSelectedReason:C,setShowCancelDialog:y,setShowThankYou:w};s={feedbackText:z,isLoading:a,selectedBenefitsImprovement:F,selectedChange:D,selectedProfileChange:H,selectedReason:B,showCancelDialog:x,showThankYou:v};var K=!1,L=null,M=function(){if(B==null||B==="")return!1;if(B===d("DCPSurveyConstants").SURVEY_REASON_CHANGE_SUBSCRIPTION)return D!=null&&D!=="";if(B===d("DCPSurveyConstants").SURVEY_REASON_BENEFITS_DISSATISFIED)return F!=null&&F!=="";return B===d("DCPSurveyConstants").SURVEY_REASON_CHANGE_PROFILE?H!=null&&H!=="":!0},N=function(){!t?u(!0):(o(!0),r({benefits_improvement_option:F,entitlement_id:i!=null?i:"",feedback:z,profile_change_option:H,reason:B!=null?B:"",subscription_change_option:D},function(a){o(!1),a.dcp_submit_subscription_survey===!0?(w(!0),u(!1)):(w(!0),u(!1))},function(a){o(!1)}))};return j.jsxs(j.Fragment,{children:[t&&!v&&!x&&j.jsx(c("FDSDialog.react"),{footer:j.jsx(c("FDSDialogFooter.react"),{expanding:!1,primary:{disabled:Boolean(a)||!M(),label:"Submit feedback",onPress:N}}),header:j.jsx(c("FDSDialogHeader.react"),{onClose:e,text:"Cancel subscription"}),onClose:e,children:j.jsxs("div",{className:"x1sy10c2 xieb3on xyqm7xq x1ys307a x7ep2pv xuxxueq",children:[j.jsx(c("FDSText.react"),{type:"headlineEmphasized3",children:h._(/*BTDS*/"Please let us know why you want to cancel")}),j.jsx("div",{style:{marginTop:"8px"},children:j.jsxs(c("FDSText.react"),{type:"body4",children:[h._(/*BTDS*/"We may use your data for personalization, innovation, research and other purposes described in our"),"xa0",j.jsx(c("CometLink.react"),{href:"https://www.facebook.com/privacy/policy",children:j.jsx(c("FDSText.react"),{color:"blueLink",type:"body4",children:j.jsx("strong",{children:h._(/*BTDS*/"Privacy Policy")})})})]})}),j.jsx(c("CometColumn.react"),{children:j.jsx(c("CometColumnItem.react"),{style:{marginTop:"16px"},children:j.jsx("div",{children:j.jsx(c("FDSFormCombobox.react"),{label:d("DCPSurveyConstants").REASON_DEFAULT_LABEL,listboxAccessibleLabelProps:{"aria-label":h._(/*BTDS*/"Dropdown list")},onValueChange:function(a){return C(a)},options:d("DCPSurveyConstants").REASON_OPTIONS.map(function(a){return{value:a.value}}),value:B!=null?B:""})})})}),(B==null||B.length===0)&&j.jsx("div",{style:{marginTop:"16px"},children:j.jsx(c("FDSText.react"),{color:"secondary",type:"body4",children:h._(/*BTDS*/"We are working hard to improve Meta Verified and want to know what would make it better for you.")})}),B===d("DCPSurveyConstants").SURVEY_REASON_CHANGE_SUBSCRIPTION&&j.jsx(c("DCPSurveyChangeSubscriptionFlow.react"),{actions:J,state:s}),B===d("DCPSurveyConstants").SURVEY_REASON_BENEFITS_DISSATISFIED&&j.jsx(c("DCPSurveyBenefitsImprovementFlow.react"),{_errorCondition:K,_errorMessage:L,actions:J,state:s}),B===d("DCPSurveyConstants").SURVEY_REASON_CHANGE_PROFILE&&j.jsx(c("DCPSurveyChangeProfileFlow.react"),{actions:J,state:s}),B!=null&&B.length>0&&j.jsx(c("DCPSurveyFeedbackFlow.react"),{actions:J,state:s})]})}),v&&!x&&j.jsx(c("DCPSurveyThankYouScreen.react"),{actions:J,onClose:e}),x&&j.jsx(c("IGPayHubDigitalSubscriptionCancelButtonDialog.react"),{alertDescription:(a=b.alert_dialog_description)!=null?a:"",alertTitle:(M=b.alert_dialog_title)!=null?M:"",alreadySucceeded:!1,okText:(N=b.alert_dialog_ok_text)!=null?N:"",onClose:function(){y(!1),w(!1),u(!0),f()},onSubmit:function(){g(),y(!1),w(!1),u(!0)},selectedEntitlementID:i,successDescription:(K=b.success_dialog_description)!=null?K:"",successTitle:(L=b.success_dialog_title)!=null?L:""})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
usePaymentsCometSubmitSubscriptionSurveyMutation",["CometRelay","react","usePaymentsCometSubmitSubscriptionSurveyMutation.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h,i,j=(i||d("react")).useCallback,k=h!==void 0?h:h=b("usePaymentsCometSubmitSubscriptionSurveyMutation.graphql");function a(){var a=d("CometRelay").useRelayEnvironment();return j(function(b,c,e){return d("CometRelay").commitMutation(a,{mutation:k,onCompleted:function(b){function a(a){return b.apply(this,arguments)}a.toString=function(){return b.toString()};return a}(function(a){c(a)}),onError:function(b){function a(){return b.apply(this,arguments)}a.toString=function(){return b.toString()};return a}(function(){e()}),variables:{input:b}})},[a])}g["default"]=a}),98);
-----
usePaymentsCometSubmitSubscriptionSurveyMutation.graphql",["usePaymentsCometSubmitSubscriptionSurveyMutation_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],c=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],kind:"ScalarField",name:"dcp_submit_subscription_survey",storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"usePaymentsCometSubmitSubscriptionSurveyMutation",selections:c,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"usePaymentsCometSubmitSubscriptionSurveyMutation",selections:c},params:{id:b("usePaymentsCometSubmitSubscriptionSurveyMutation_facebookRelayOperation"),metadata:{},name:"usePaymentsCometSubmitSubscriptionSurveyMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
usePaymentsCometSubmitSubscriptionSurveyMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="9805007182954455"}),null);
-----