DeveloperIntegrationGuideSetupWhatsAppTemplatesContent.react",["fbt","CometPlaceholder.react","DeveloperIntegrationGuideSetupWhatsAppTemplatesContentQuery.graphql","DeveloperIntegrationGuideTemplatePreviewPanel.react","DeveloperIntegrationOnboardingCollapsibleCardGlimmer.react","GeoBaseInteractiveRow.react","GeoButton.react","GeoCard.react","GeoFlexbox.react","GeoHeading.react","GeoSection.react","GeoSwitch.react","GeoText.react","geoMargin","react","react-relay","useDeveloperIntegrationGuideSharedState","useTemplatePreviewData"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c=u||(u=o("react")),d=u,m=d.useEffect,p=d.useMemo,_=d.useState,f="SETUP_WHATSAPP_TEMPLATES",g={leftPanel:{flexBasis:"xorjnos",minWidth:"x18n5i07",$$css:!0}},h=["appointment_confirmation_1","appointment_reminder_2","appointment_cancellation_1","appointment_reschedule_1"],y={appointment_confirmation_1:"Confirmation",appointment_reminder_2:"Reminder",appointment_cancellation_1:"Cancellation",appointment_reschedule_1:"Rescheduled"},C=e!==void 0?e:e=n("DeveloperIntegrationGuideSetupWhatsAppTemplatesContentQuery.graphql");function b(){var e=r("useDeveloperIntegrationGuideSharedState")(),t=e.finishStep,n=e.updateStepProgress;return c.jsxs(r("GeoFlexbox.react"),{direction:"column",gap:8,children:[c.jsx(r("CometPlaceholder.react"),{fallback:c.jsx(o("DeveloperIntegrationOnboardingCollapsibleCardGlimmer.react").DeveloperIntegrationOnboardingCollapsibleCardGlimmerSection,{}),name:i.id,children:c.jsx(v,{})}),c.jsx(r("GeoFlexbox.react"),{alignItems:"end",gap:8,justifyContent:"end",xstyle:r("geoMargin").top8,children:c.jsx(r("GeoButton.react"),{label:s._(/*BTDS*/"Continue"),onClick:function(){n(f,"completed"),t()}},"developer-integration-guide-setup-templates-step-next")})]})}b.displayName=b.name+" [from "+i.id+"]";function v(){var e,t=r("useDeveloperIntegrationGuideSharedState")(),n=t.setSelectedLibraryTemplates,a=t.state,i=a.selectedLibraryTemplates,l=a.wabaID,u=_("parameters"),d=u[0],f=u[1],b=_("ENGLISH_US"),v=b[0],S=b[1],R=_(null),L=R[0],E=R[1],k=o("react-relay").useLazyLoadQuery(C,{wabaID:l!=null?l:"",filters:{locale:v,search_text:"",industries:[],usecases:[],tag:"UTILITY"}},{fetchPolicy:"store-or-network"}),I=p(function(){var e,t,n=(e=k==null||(t=k.whatsapp_business_template_library)==null||(t=t.templates)==null?void 0:t.edges)!=null?e:[],r=n.map(function(e){return e==null?void 0:e.node}).filter(Boolean);return h.map(function(e){return r.find(function(t){return(t==null?void 0:t.name)===e})}).filter(Boolean)},[k]);m(function(){if(i.length===0&&I.length>0){var e=I.map(function(e){return e==null?void 0:e.name}).filter(function(e){return e!=null});n(e)}},[I,i.length,n]);var T=(e=I.find(function(e){return(e==null?void 0:e.name)===L}))!=null?e:I[0],D=r("useTemplatePreviewData")(T,d==="parameters");return c.jsxs(c.Fragment,{children:[c.jsx(r("GeoText.react"),{children:s._(/*BTDS*/"Choose from these pre-written utility message templates so you can easily keep your customers updated about their appointments.")}),c.jsxs(r("GeoFlexbox.react"),{gap:8,children:[c.jsx(r("GeoFlexbox.react"),{direction:"column",justifyContent:"start",xstyle:g.leftPanel,children:c.jsxs(r("GeoCard.react"),{children:[c.jsx(r("GeoSection.react"),{children:c.jsx(r("GeoHeading.react"),{level:4,children:s._(/*BTDS*/"Appointment message management")})}),I.map(function(e){var t,o;if(e==null)return null;var a=(t=e.name)!=null?t:"",l=(o=y[a])!=null?o:a;return c.jsx(r("GeoBaseInteractiveRow.react"),{accessibilityRole:"button",isHighlighted:(T==null?void 0:T.name)===a,onPress:function(){return E(a)},children:c.jsx(r("GeoSection.react"),{children:c.jsxs(r("GeoFlexbox.react"),{alignItems:"center",gap:8,justifyContent:"space-between",children:[c.jsx(r("GeoFlexbox.react"),{alignItems:"center",gap:8,children:c.jsx(r("GeoText.react"),{children:l})}),c.jsx(r("GeoSwitch.react"),{isLabelHidden:!0,label:l,labelPosition:"suffix",onChange:function(){var e=new Set(i);e.has(a)?e.delete(a):e.add(a),n(Array.from(e))},value:i.includes(a)})]})})},a)})]})}),c.jsx(r("DeveloperIntegrationGuideTemplatePreviewPanel.react"),{previewData:D,previewTab:d,selectedLocale:v,setPreviewTab:f,setSelectedLocale:S})]})]})}v.displayName=v.name+" [from "+i.id+"]",l.default=b}),226);
-----
DeveloperIntegrationGuideSetupWhatsAppTemplatesContentQuery.graphql",["DeveloperIntegrationGuideSetupWhatsAppTemplatesContentQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e={defaultValue:null,kind:"LocalArgument",name:"filters"},t={defaultValue:null,kind:"LocalArgument",name:"wabaID"},r=[{kind:"Variable",name:"filters",variableName:"filters"},{kind:"Literal",name:"first",value:20},{kind:"Variable",name:"waba_id",variableName:"wabaID"}],o={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null};return{fragment:{argumentDefinitions:[e,t],kind:"Fragment",metadata:null,name:"DeveloperIntegrationGuideSetupWhatsAppTemplatesContentQuery",selections:[{alias:null,args:null,concreteType:"XFBWhatsAppBusinessTemplateLibrary",kind:"LinkedField",name:"whatsapp_business_template_library",plural:!1,selections:[{alias:null,args:r,concreteType:"BMTemplatesConnection",kind:"LinkedField",name:"templates",plural:!1,selections:[{alias:null,args:null,concreteType:"BMTemplatesEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"BMTemplateLibrary",kind:"LinkedField",name:"node",plural:!1,selections:[o,a,{args:null,kind:"FragmentSpread",name:"useTemplatePreviewData_template"}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[t,e],kind:"Operation",name:"DeveloperIntegrationGuideSetupWhatsAppTemplatesContentQuery",selections:[{alias:null,args:null,concreteType:"XFBWhatsAppBusinessTemplateLibrary",kind:"LinkedField",name:"whatsapp_business_template_library",plural:!1,selections:[{alias:null,args:r,concreteType:"BMTemplatesConnection",kind:"LinkedField",name:"templates",plural:!1,selections:[{alias:null,args:null,concreteType:"BMTemplatesEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"BMTemplateLibrary",kind:"LinkedField",name:"node",plural:!1,selections:[o,a,{alias:null,args:null,kind:"ScalarField",name:"template_body",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"header",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"header_type",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"header_text_params",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"header_text_params_type",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"footer",storageKey:null},{alias:null,args:null,concreteType:"XFBWhatsAppHSMComponentButtonGet",kind:"LinkedField",name:"buttons",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"text",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"url",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"phone_number",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"body_text_params",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"body_text_params_type",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}]},params:{id:n("DeveloperIntegrationGuideSetupWhatsAppTemplatesContentQuery_facebookRelayOperation"),metadata:{},name:"DeveloperIntegrationGuideSetupWhatsAppTemplatesContentQuery",operationKind:"query",text:null}}})();a.exports=e}),null);
-----
DeveloperIntegrationGuideSetupWhatsAppTemplatesContentQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="25508938688715516"}),null);
-----