LeadGenCRMIntegrationMicrosoftExcelIntegrations.react",["fbt","GeoBaseGridLayout.react","GeoBaseGridLayoutItem.react","GeoBaseInlinePressable.react","GeoButton.react","GeoDivider.react","GeoFlexbox.react","GeoTextPairing.react","LeadGenCRMIntegrationMicrosoftExcelAutomaticIntegrationsSettings.react","LeadGenCRMIntegrationMicrosoftExcelCreateIntegrationModal.react","LeadGenCRMIntegrationMicrosoftExcelCreateIntegrationModalQuery.graphql","LeadGenCRMIntegrationMicrosoftExcelIntegrationTable.react","LeadGenCRMIntegrationMicrosoftExcelIntegrationsQuery.graphql","LeadGenCRMIntegrationMicrosoftExcelLoggerHelper","LeadGenCRMIntegrationMicrosoftExcelUtils","LeadGenDirectCRMIntegrationUtils","LeadGenLeadsRetrievalDataManager","LeadGenLeadsRetrievalUIActions","RelayHooks","geoMargin","meta-brand-arrow-left-horizontal-rectangle-outline-16","meta-brand-arrow-left-outline-16","nullthrows","react","react-compiler-runtime"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c=u||(u=o("react")),d=u,m=d.startTransition,p=d.useCallback,_=d.useState,f="1494674238621179";function g(t){var a=o("react-compiler-runtime").c(69),i=t.authID,l=t.errorMessage,u=t.existingIntegrations,d=t.integrators,p=t.microsoftExcelWorksheetList,g=t.pageID,y=t.queryReference,C=t.refreshMicrosoftExcelQuery,b=t.selectedForm,v=t.selectedMicrosoftExcelWorksheet,S=t.thirdPartyAppID,R;a[0]===Symbol.for("react.memo_cache_sentinel")?(R=new(r("LeadGenCRMIntegrationMicrosoftExcelLoggerHelper")),a[0]=R):R=a[0];var L=R,E=_(!1),k=E[0],I=E[1],T=o("RelayHooks").useMutation(o("LeadGenDirectCRMIntegrationUtils").cancelDirectCRMIntegrationMutation),D=T[0],x=T[1],$=e!==void 0?e:e=n("LeadGenCRMIntegrationMicrosoftExcelIntegrationsQuery.graphql"),P=_(!1),N=P[0],M=P[1],w=o("RelayHooks").usePreloadedQuery($,y),A=w.page,F=w.fetch__XFBLeadGenDirectCRMIntegrationAuth,O=A==null?void 0:A.lead_gen_microsoft_excel_automatic_integration_config_by_page_id,B=O!=null,W=A==null?void 0:A.lead_gen_direct_crm_integration_config_by_page_id,q=o("RelayHooks").useQueryLoader(r("LeadGenCRMIntegrationMicrosoftExcelCreateIntegrationModalQuery.graphql")),U=q[0],V=q[1],H;a[1]!==V||a[2]!==g||a[3]!==S?(H=function(){m(function(){V({pageID:g,thirdPartyAppID:S},{fetchPolicy:"network-only"})})},a[1]=V,a[2]=g,a[3]=S,a[4]=H):H=a[4];var G=H,z;a[5]!==W?(z=W!=null&&W.filter(h).length>0,a[5]=W,a[6]=z):z=a[6];var j=z,K;a[7]!==g?(K=function(){r("LeadGenLeadsRetrievalDataManager").fetchPageCRMIntegrationActivity(null,g,null,!0)},a[7]=g,a[8]=K):K=a[8];var Q=K,X;a[9]===Symbol.for("react.memo_cache_sentinel")?(X={className:"xw7yly9"},a[9]=X):X=a[9];var Y;a[10]!==Q||a[11]!==j?(Y=j&&c.jsx(r("GeoButton.react"),{icon:o("meta-brand-arrow-left-outline-16").metaBrandArrowLeftArrowLeftOutline16,isLabelHidden:!0,label:s._(/*BTDS*/"Go back to CRM integrations"),xstyle:r("geoMargin").end8,onClick:Q}),a[10]=Q,a[11]=j,a[12]=Y):Y=a[12];var J;a[13]===Symbol.for("react.memo_cache_sentinel")?(J=c.jsx(r("GeoTextPairing.react"),{description:null,heading:s._(/*BTDS*/"Microsoft Excel Worksheet Integrations"),size:"header2"}),a[13]=J):J=a[13];var Z;a[14]!==Y?(Z=c.jsx(r("GeoBaseGridLayoutItem.react"),{columns:1,"data-testid":void 0,children:c.jsxs(r("GeoFlexbox.react"),{alignItems:"center",children:[Y,J]})}),a[14]=Y,a[15]=Z):Z=a[15];var ee;a[16]===Symbol.for("react.memo_cache_sentinel")?(ee={className:"x10l6tqk xdg88n9"},a[16]=ee):ee=a[16];var te;a[17]!==i||a[18]!==D||a[19]!==u||a[20]!==j||a[21]!==x||a[22]!==g||a[23]!==G||a[24]!==C?(te=c.jsx(r("GeoBaseGridLayoutItem.react"),{columns:1,"data-testid":void 0,children:c.jsx("div",babelHelpers.extends({},ee,{children:j?c.jsx(r("GeoFlexbox.react"),{alignItems:"center",children:c.jsx(r("GeoButton.react"),{"data-testid":void 0,icon:o("meta-brand-arrow-left-horizontal-rectangle-outline-16").metaBrandArrowLeftHorizontalRectangleGoToOutline16,label:s._(/*BTDS*/"New Integration"),variant:"primary",xstyle:[r("geoMargin").start8,r("geoMargin").end0],onClick:function(){L.logClickNewCreateModal(g,i!=null?i:""),G(),I(!0)}})}):c.jsx(r("GeoButton.react"),{"data-testid":void 0,isDisabled:x,label:s._(/*BTDS*/"Cancel setup"),variant:"default",onClick:function(){D({variables:{lead_gen_direct_crm_integration_auth_id:r("nullthrows")(i)},onCompleted:function(){o("LeadGenLeadsRetrievalUIActions").cancelDirectIntegration(),o("LeadGenLeadsRetrievalUIActions").deleteCRMIntegration(g,f,u),C(r("nullthrows")(i))}})}})}))}),a[17]=i,a[18]=D,a[19]=u,a[20]=j,a[21]=x,a[22]=g,a[23]=G,a[24]=C,a[25]=te):te=a[25];var ne;a[26]!==te||a[27]!==Z?(ne=c.jsxs(r("GeoBaseGridLayout.react"),{columns:2,"data-testid":void 0,xstyle:r("geoMargin").start16,children:[Z,te]}),a[26]=te,a[27]=Z,a[28]=ne):ne=a[28];var re;a[29]!==j?(re=j&&c.jsx(r("GeoDivider.react"),{}),a[29]=j,a[30]=re):re=a[30];var oe;a[31]!==ne||a[32]!==re?(oe=c.jsxs("div",{children:[ne,re]}),a[31]=ne,a[32]=re,a[33]=oe):oe=a[33];var ae;a[34]!==i||a[35]!==j||a[36]!==W||a[37]!==g||a[38]!==G?(ae=j?c.jsx(r("LeadGenCRMIntegrationMicrosoftExcelIntegrationTable.react"),{integrationConfigFragment:W}):c.jsxs("div",{className:"xyqm7xq xw7yly9 x1yztbdb",children:[c.jsx(r("GeoTextPairing.react"),{description:s._(/*BTDS*/"Create new integration to easily access all the leads in a Microsoft Excel Worksheet."),heading:s._(/*BTDS*/"Link a lead ad form"),size:"header2"}),c.jsx(r("GeoBaseInlinePressable.react"),{"aria-label":"Pressable","data-testid":void 0,variant:"creation",xstyle:r("geoMargin").top12,onPress:function(){G(),I(!0),L.logClickNewCreateModal(g,i!=null?i:"")},children:s._(/*BTDS*/"New Integration")})]}),a[34]=i,a[35]=j,a[36]=W,a[37]=g,a[38]=G,a[39]=ae):ae=a[39];var ie;a[40]!==i||a[41]!==l||a[42]!==B||a[43]!==W||a[44]!==d||a[45]!==O||a[46]!==g||a[47]!==N?(ie=B&&c.jsx(r("LeadGenCRMIntegrationMicrosoftExcelAutomaticIntegrationsSettings.react"),{accessToken:null,authID:i,errorMessage:l,integrationListFragment:W,integrators:d,microsoftExcelAutomaticIntegrationSettingsFragmentKey:O,pageID:g,scope:null,showAutoIntegrationSettings:N,onHide:function(){return M(!1)}}),a[40]=i,a[41]=l,a[42]=B,a[43]=W,a[44]=d,a[45]=O,a[46]=g,a[47]=N,a[48]=ie):ie=a[48];var le;a[49]!==(F==null?void 0:F.access_token)||a[50]!==(F==null?void 0:F.scope)||a[51]!==i||a[52]!==l||a[53]!==B||a[54]!==d||a[55]!==p||a[56]!==g||a[57]!==U||a[58]!==C||a[59]!==b||a[60]!==v||a[61]!==k||a[62]!==S?(le=U!=null&&c.jsx(r("LeadGenCRMIntegrationMicrosoftExcelCreateIntegrationModal.react"),{accessToken:F==null?void 0:F.access_token,authID:i,errorMessage:l,hasAutomaticIntegrationEnabled:B,integrators:d,isShown:k,microsoftExcelWorksheetList:p,pageID:g,queryRef:U,refreshMicrosoftExcelQuery:C,scope:F==null?void 0:F.scope,selectedForm:b,selectedMicrosoftExcelWorksheet:v,source:o("LeadGenCRMIntegrationMicrosoftExcelUtils").MicrosoftExcelIntegrationEntryPoint.MBS,thirdPartyAppID:S,onHide:function(){I(!1)}}),a[49]=F==null?void 0:F.access_token,a[50]=F==null?void 0:F.scope,a[51]=i,a[52]=l,a[53]=B,a[54]=d,a[55]=p,a[56]=g,a[57]=U,a[58]=C,a[59]=b,a[60]=v,a[61]=k,a[62]=S,a[63]=le):le=a[63];var se;return a[64]!==oe||a[65]!==ae||a[66]!==ie||a[67]!==le?(se=c.jsxs("div",babelHelpers.extends({},X,{children:[oe,ae,ie,le]})),a[64]=oe,a[65]=ae,a[66]=ie,a[67]=le,a[68]=se):se=a[68],se}function h(e){return e!=null}l.default=g}),226);
-----
LeadGenCRMIntegrationMicrosoftExcelIntegrationsQuery.graphql",["relay-runtime"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e={defaultValue:null,kind:"LocalArgument",name:"authID"},t={defaultValue:null,kind:"LocalArgument",name:"pageID"},n={defaultValue:null,kind:"LocalArgument",name:"thirdPartyAppID"},r=[{kind:"Variable",name:"id",variableName:"pageID"}],o=[{kind:"Variable",name:"third_party_app_id",variableName:"thirdPartyAppID"}],a=[{kind:"Variable",name:"id",variableName:"authID"}],i={alias:null,args:null,kind:"ScalarField",name:"access_token",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"scope",storageKey:null},s={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:[e,t,n],kind:"Fragment",metadata:null,name:"LeadGenCRMIntegrationMicrosoftExcelIntegrationsQuery",selections:[{alias:null,args:r,concreteType:"Page",kind:"LinkedField",name:"page",plural:!1,selections:[{alias:null,args:o,concreteType:"XFBLeadGenDirectCRMIntegrationConfig",kind:"LinkedField",name:"lead_gen_direct_crm_integration_config_by_page_id",plural:!0,selections:[{args:null,kind:"FragmentSpread",name:"LeadGenCRMIntegrationMicrosoftExcelIntegrationTableDirectCrmIntegrationConfigFragment_fragment"},{args:null,kind:"FragmentSpread",name:"LeadGenCRMIntegrationMicrosoftExcelAutomaticIntegrationsSettingsDirectCrmIntegrationConfigFragment"}],storageKey:null},{alias:null,args:null,concreteType:"XFBLeadGenMicrosoftExcelAutomaticIntegrationConfig",kind:"LinkedField",name:"lead_gen_microsoft_excel_automatic_integration_config_by_page_id",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"LeadGenCRMIntegrationMicrosoftExcelAutomaticIntegrationsSettingsFragment"}],storageKey:null}],storageKey:null},{alias:null,args:a,concreteType:"XFBLeadGenDirectCRMIntegrationAuth",kind:"LinkedField",name:"fetch__XFBLeadGenDirectCRMIntegrationAuth",plural:!1,selections:[i,l],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[t,n,e],kind:"Operation",name:"LeadGenCRMIntegrationMicrosoftExcelIntegrationsQuery",selections:[{alias:null,args:r,concreteType:"Page",kind:"LinkedField",name:"page",plural:!1,selections:[{alias:null,args:o,concreteType:"XFBLeadGenDirectCRMIntegrationConfig",kind:"LinkedField",name:"lead_gen_direct_crm_integration_config_by_page_id",plural:!0,selections:[s,{alias:null,args:null,concreteType:"XFBLeadGenDirectCRMIntegrationConfigResources",kind:"LinkedField",name:"resources",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"key",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"LeadGenDeepLinkData",kind:"LinkedField",name:"lead_gen_data",plural:!1,selections:[s,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"creation_time",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"XFBLeadGenMicrosoftExcelAutomaticIntegrationConfig",kind:"LinkedField",name:"lead_gen_microsoft_excel_automatic_integration_config_by_page_id",plural:!1,selections:[s,{alias:null,args:null,kind:"ScalarField",name:"drive_id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"workbook_id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"workbook_name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"workbook_web_url",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"update_time",storageKey:null}],storageKey:null},s],storageKey:null},{alias:null,args:a,concreteType:"XFBLeadGenDirectCRMIntegrationAuth",kind:"LinkedField",name:"fetch__XFBLeadGenDirectCRMIntegrationAuth",plural:!1,selections:[i,l,s],storageKey:null}]},params:{id:"25081439838217344",metadata:{},name:"LeadGenCRMIntegrationMicrosoftExcelIntegrationsQuery",operationKind:"query",text:null}}})();n("relay-runtime").PreloadableQueryRegistry.set(e.params.id,e),a.exports=e}),null);
-----