BizInboxIGAutomationExtensionModal.react",["fbt","BizInboxAutomationFbtUtils","BizInboxAutomationSaveChangesToast.react","BizInboxAutomationTemplatesData","BizInboxIGAutomationExtensionModalFragment.graphql","BizInboxIGAutomationExtensionModalQuery.graphql","BizInboxIGAutomationExtensionMutation","GeoButton.react","GeoModal.react","GeoModalFooter.react","GeoModalHeader.react","GeoSelectableImageTile.react","GeoSelectableImageTileGroup.react","GeoSwitch.react","GeoVStack.react","IPB4BImage.react","Link.react","RelayHooks","XBizWebCometBizSuiteInboxAutomatedResponsesControllerRouteBuilder","react","useGeoToaster"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k,l=k||(k=d("react"));e=k;var m=e.useCallback,n=e.useMemo,o=e.useState,p={content:{paddingTop:"xexx8yu",paddingInlineEnd:"xv54qhq",paddingBottom:"x18d9i69",paddingInlineStart:"xf7dkkf",$$css:!0},toggle:{marginBottom:"x1e56ztr",$$css:!0}},q=i!==void 0?i:i=b("BizInboxIGAutomationExtensionModalFragment.graphql"),r=j!==void 0?j:j=b("BizInboxIGAutomationExtensionModalQuery.graphql");function a(a){var b=a.props,e=b.pageID,f=b.onHide;b=a.queries;a=o(!1);var g=a[0],i=a[1],j=d("RelayHooks").useRelayEnvironment();a=d("RelayHooks").usePreloadedQuery(r,b.BizInboxIGAutomationExtensionModalQueryReference);b=o([]);var k=b[0],s=b[1];b=o(!1);var t=b[0],u=b[1];b=c("useGeoToaster")();var v=b.add;a=(b=d("RelayHooks").useFragment(q,a.page))!=null?b:{};var w=a.ig_automation_extension_config,x=n(function(){var a,b,c,d=[];(w==null||(a=w.instant_reply)==null?void 0:a.is_eligible)===!0&&d.push("INSTANT_REPLY");(w==null||(b=w.away_message)==null?void 0:b.is_eligible)===!0&&d.push("AWAY_MESSAGE");(w==null||(c=w.faq)==null?void 0:c.is_eligible)===!0&&d.push("CUSTOM_QUESTIONS");return d},[w]);b=function(a){a?(i(!0),s([].concat(x))):(i(!1),s([]))};var y=function(a){if(!a)return;s([].concat(a));a.length===0?i(!1):i(!0)};a=m(function(){var a={};e!=null&&(a.asset_id=e);a=c("XBizWebCometBizSuiteInboxAutomatedResponsesControllerRouteBuilder").buildURL(a);return h._(/*BTDS*/"Youu2019re currently using these automations on Messenger but not Instagram. Or an automation was created on Instagram but is not turned on. Turn on for both channels and never miss a message. To manage, go to {automationLink}.",[h._param("automationLink",l.jsx(c("Link.react"),{href:a,children:h._(/*BTDS*/"Automations")}))])},[e]);var z=m(function(){return l.jsx(c("GeoSelectableImageTileGroup.react"),{onChange:y,ratio:"landscape",selectionType:"multi",size:144,gutter:16,value:k,children:x.map(function(a){var b=d("BizInboxAutomationTemplatesData").BizInboxAutomationTemplatesData.get(a);return b==null?null:l.jsx(c("GeoSelectableImageTile.react"),{content:b.description,heading:b.title,media:l.jsx(c("IPB4BImage.react"),{src:b.illustration}),value:a},a)})})},[x,k]),A=function(){u(!0),d("BizInboxIGAutomationExtensionMutation").commit(j,{page_id:e!=null?e:"",automation_types:k},{onSuccess:function(){u(!1),v(l.jsx(c("BizInboxAutomationSaveChangesToast.react"),{isSuccess:!0})),f("transition")},onFailure:function(){u(!1),v(l.jsx(c("BizInboxAutomationSaveChangesToast.react"),{isSuccess:!1}))}})};return l.jsx(c("GeoModal.react"),{header:l.jsx(c("GeoModalHeader.react"),{heading:d("BizInboxAutomationFbtUtils").getIGAutomationExtensionModalHeader(),description:a()}),footer:l.jsx(c("GeoModalFooter.react"),{primaryButton:l.jsx(c("GeoButton.react"),{isLoading:t,variant:"primary",label:d("BizInboxAutomationFbtUtils").getIGAutomationExtensionModalFooterCTA(),onClick:A})}),onHide:f,children:l.jsxs(c("GeoVStack.react"),{xstyle:p.content,context:"content",relation:"section",children:[l.jsx(c("GeoSwitch.react"),{xstyle:p.toggle,label:d("BizInboxAutomationFbtUtils").getIGAutomationExtensionModalSwitchDescription(),labelPosition:"suffix",onChange:b,value:g}),z()]})})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
BizInboxIGAutomationExtensionModalQuery.graphql",["BizInboxIGAutomationExtensionModalQuery_facebookRelayOperation","relay-runtime"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"page_id"}],c=[{kind:"Variable",name:"id",variableName:"page_id"}],d=[{alias:null,args:null,kind:"ScalarField",name:"is_eligible",storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"BizInboxIGAutomationExtensionModalQuery",selections:[{alias:null,args:c,concreteType:"Page",kind:"LinkedField",name:"page",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"BizInboxIGAutomationExtensionModalFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"BizInboxIGAutomationExtensionModalQuery",selections:[{alias:null,args:c,concreteType:"Page",kind:"LinkedField",name:"page",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBBizInboxIgAutomationExtensionConfig",kind:"LinkedField",name:"ig_automation_extension_config",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBBizInboxIgInstantReplyExtensionConfig",kind:"LinkedField",name:"instant_reply",plural:!1,selections:d,storageKey:null},{alias:null,args:null,concreteType:"XFBBizInboxIgAwayMessageExtensionConfig",kind:"LinkedField",name:"away_message",plural:!1,selections:d,storageKey:null},{alias:null,args:null,concreteType:"XFBBizInboxIgAwayMessageExtensionConfig",kind:"LinkedField",name:"faq",plural:!1,selections:d,storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}]},params:{id:b("BizInboxIGAutomationExtensionModalQuery_facebookRelayOperation"),metadata:{},name:"BizInboxIGAutomationExtensionModalQuery",operationKind:"query",text:null}}}();b("relay-runtime").PreloadableQueryRegistry.set(a.params.id,a);e.exports=a}),null);
-----
BizInboxIGAutomationExtensionModal.entrypoint",["BizInboxIGAutomationExtensionModalQuery$Parameters","JSResourceForInteraction"],(function(r,u,o,s,d,I,e){"use strict";var t={getPreloadProps:function(n){var a=n.page_id;return{queries:{BizInboxIGAutomationExtensionModalQueryReference:{parameters:o("BizInboxIGAutomationExtensionModalQuery$Parameters"),variables:{page_id:a}}}}},root:o("JSResourceForInteraction")("BizInboxIGAutomationExtensionModal.react").__setRef("BizInboxIGAutomationExtensionModal.entrypoint")};e.default=t}),98);
-----
BizInboxIGAutomationExtensionModalQuery$Parameters",["BizInboxIGAutomationExtensionModalQuery_facebookRelayOperation"],(function(t,e,i,r,o,u){"use strict";var a={kind:"PreloadableConcreteRequest",params:{id:e("BizInboxIGAutomationExtensionModalQuery_facebookRelayOperation"),metadata:{},name:"BizInboxIGAutomationExtensionModalQuery",operationKind:"query",text:null}};o.exports=a}),null);
-----
BizInboxIGAutomationExtensionModalQuery_facebookRelayOperation",[],(function(n,a,i,r,o,t){o.exports="24412898338397444"}),null);
-----
-----
BizInboxIGAutomationExtensionModalQuery.graphql",["BizInboxIGAutomationExtensionModalQuery_facebookRelayOperation","relay-runtime"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"page_id"}],c=[{kind:"Variable",name:"id",variableName:"page_id"}],d=[{alias:null,args:null,kind:"ScalarField",name:"is_eligible",storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"BizInboxIGAutomationExtensionModalQuery",selections:[{alias:null,args:c,concreteType:"Page",kind:"LinkedField",name:"page",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"BizInboxIGAutomationExtensionModalFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"BizInboxIGAutomationExtensionModalQuery",selections:[{alias:null,args:c,concreteType:"Page",kind:"LinkedField",name:"page",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBBizInboxIgAutomationExtensionConfig",kind:"LinkedField",name:"ig_automation_extension_config",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBBizInboxIgInstantReplyExtensionConfig",kind:"LinkedField",name:"instant_reply",plural:!1,selections:d,storageKey:null},{alias:null,args:null,concreteType:"XFBBizInboxIgAwayMessageExtensionConfig",kind:"LinkedField",name:"away_message",plural:!1,selections:d,storageKey:null},{alias:null,args:null,concreteType:"XFBBizInboxIgAwayMessageExtensionConfig",kind:"LinkedField",name:"faq",plural:!1,selections:d,storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}]},params:{id:b("BizInboxIGAutomationExtensionModalQuery_facebookRelayOperation"),metadata:{},name:"BizInboxIGAutomationExtensionModalQuery",operationKind:"query",text:null}}}();b("relay-runtime").PreloadableQueryRegistry.set(a.params.id,a);e.exports=a}),null);
-----
BizInboxIGAutomationExtensionModal.entrypoint",["BizInboxIGAutomationExtensionModalQuery$Parameters","JSResourceForInteraction"],(function(r,u,o,s,d,I,e){"use strict";var t={getPreloadProps:function(n){var a=n.page_id;return{queries:{BizInboxIGAutomationExtensionModalQueryReference:{parameters:o("BizInboxIGAutomationExtensionModalQuery$Parameters"),variables:{page_id:a}}}}},root:o("JSResourceForInteraction")("BizInboxIGAutomationExtensionModal.react").__setRef("BizInboxIGAutomationExtensionModal.entrypoint")};e.default=t}),98);
-----
BizInboxIGAutomationExtensionModalQuery$Parameters",["BizInboxIGAutomationExtensionModalQuery_facebookRelayOperation"],(function(t,e,i,r,o,u){"use strict";var a={kind:"PreloadableConcreteRequest",params:{id:e("BizInboxIGAutomationExtensionModalQuery_facebookRelayOperation"),metadata:{},name:"BizInboxIGAutomationExtensionModalQuery",operationKind:"query",text:null}};o.exports=a}),null);
-----
BizInboxIGAutomationExtensionModalQuery_facebookRelayOperation",[],(function(n,a,i,r,o,t){o.exports="24412898338397444"}),null);
-----