WhatsAppBusinessAccountCloudAPIEventSharingConsentModal.react",["ix","BMPPaidMessagingMeasurementLogger","BizMsgPlatformImpressionWrapper.react","GeoButton.react","GeoCancelButton.react","GeoFlexbox.react","GeoFooterSection.react","GeoIllustrationModal.react","GeoModalFooter.react","GeoSection.react","GeoText.react","GeoTextPairing.react","GeoToast.react","GeoVStack.react","Image.react","RelayFBEnvironment","RelayHooks","RelayModern","WhatsAppBusinessAccountCloudAPIEventSharingConsentModalPacingMutation.graphql","WhatsAppBusinessAccountCloudAPIEventSharingConsentModalPacingQuery.graphql","constantsFBTStrings","emptyFunction","geoMargin","react","useGeoToaster","useSessionStorage__UNSAFE","useUpdateMarketingMessageWhatsAppBusinessDefaultEventSharingConsent"],(function(w,p,n,o,Q,y,x,G){"use strict";var u,d,M,S,e=S||(S=n("react")),W=(M||(M=o("react"))).useState,F=562,T=u!==void 0?u:u=p("WhatsAppBusinessAccountCloudAPIEventSharingConsentModalPacingQuery.graphql"),b=d!==void 0?d:d=p("WhatsAppBusinessAccountCloudAPIEventSharingConsentModalPacingMutation.graphql");function g(a){var t=a.config,l=t.environment,s=t.onCompleted,A=t.onError;return o("RelayModern").commitMutation(l,{mutation:b,variables:{},onCompleted:s,onError:A})}function h(a){var t,l=a.businessDefaultConsented,s=a.businessID,A=o("RelayHooks").useLazyLoadQuery(T,{},{fetchPolicy:"store-and-network"}),_=n("useSessionStorage__UNSAFE")("event_sharing_modal_has_shown",!1),R=_[0],v=_[1],P=W(((t=A.xfb_bizsuite_guidance_events_count)!=null?t:0)<=3&&!R),j=P[0],C=P[1],f=n("useGeoToaster")(),E=f.add,I=n("useUpdateMarketingMessageWhatsAppBusinessDefaultEventSharingConsent")(s,l,function(){E(e.jsx(n("GeoToast.react"),{heading:n("constantsFBTStrings").CloudAPIEventSharingToast}))},function(r){var i;E(e.jsx(n("GeoToast.react"),{heading:(i=r.description)!=null?i:r.message,status:"error"}))}),k=I[0],H=I[1];return e.jsx(n("BizMsgPlatformImpressionWrapper.react"),{onImpression:function(){o("BMPPaidMessagingMeasurementLogger").log({event:"CLOUDAPI_EVENT_SHARING_CONSENT_STATUS_MODAL_SHOWN",businessID:s})},children:function(i){var c;return e.jsxs(n("GeoIllustrationModal.react"),{containerRef:i,width:"auto",footer:e.jsx(n("GeoModalFooter.react"),{primaryButton:e.jsx(n("GeoButton.react"),{label:"Enable data sharing",onClick:function(){C(!1),v(!0),k(!0),g({config:{environment:n("RelayFBEnvironment"),onError:n("emptyFunction"),onCompleted:n("emptyFunction")}})},variant:"primary"}),secondaryButton:e.jsx(n("GeoCancelButton.react"),{label:"Not Now",onClick:function(){C(!1),v(!0),g({config:{environment:n("RelayFBEnvironment"),onError:n("emptyFunction"),onCompleted:n("emptyFunction")}})}})}),heading:(c=n("constantsFBTStrings")).CloudAPIEventSharingHeading,image:e.jsx(n("Image.react"),{src:G("919818"),width:F,height:180}),isShown:j,onHide:function(){C(!1),v(!0),g({config:{environment:n("RelayFBEnvironment"),onError:n("emptyFunction"),onCompleted:n("emptyFunction")}})},children:[e.jsx(n("GeoFlexbox.react"),{xstyle:m.content,children:e.jsx(n("GeoSection.react"),{children:e.jsx(n("GeoVStack.react"),{context:"container",relation:"section",xstyle:n("geoMargin").horiz4,children:e.jsx(n("GeoTextPairing.react"),{size:"header2",heading:c.CloudAPIEventSharingHeading,description:c.CloudAPIEventSharingDescription})})})}),e.jsx(n("GeoFooterSection.react"),{children:e.jsx(n("GeoText.react"),{textAlign:"start",children:c.CloudAPIEventSharingFooter})})]})}})}h.displayName=h.name+" [from "+y.id+"]";var m={content:{width:"x1a41vyt",$$css:!0}};x.default=h}),98);
-----
WhatsAppBusinessAccountCloudAPIEventSharingConsentModalPacingMutation_facebookRelayOperation",[],(function(o,a,t,i,n,u){n.exports="24299638876344010"}),null);
-----
-----
WhatsAppBusinessAccountCloudAPIEventSharingConsentModalPacingMutation_facebookRelayOperation",[],(function(o,a,t,i,n,u){n.exports="24299638876344010"}),null);
-----