AdsLeadGenFormEditorThankYouPageCTARadioButtonRow.react",["fbt","AdsLeadGenFormEditorContentThankYouPageSectionV2Contents","AdsLeadGenFormEditorFunnelLogger","AdsLeadGenFormEditorFunnelLoggerConstants","AdsLeadGenFormEditorThankYouPageCTARadioButtonRowMBSWAEligibleQuery.graphql","AdsLeadGenFormEditorThankYouPageGatedPromoCodeSectionContainer.react","AdsLeadGenFormEditorUtils","AdsLeadGenFormEditorValidationFields","AdsLeadGenFormRedesignExperiment","ClickToWhatsAppFeatureGating","GeoBaseText.react","GeoCheckboxInput.react","GeoFlexbox.react","GeoRadioList.react","GeoRadioListItem.react","GeoSwitch.react","RelayHooks","geoMargin","gkx","justknobx","qex","react"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c=u||(u=o("react")),d=u.useEffect,m=e!==void 0?e:e=n("AdsLeadGenFormEditorThankYouPageCTARadioButtonRowMBSWAEligibleQuery.graphql"),p=function(t,n,a,i,l,s,u,c){var e=[{label:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").VIEW_WEB_LABEL,value:"VIEW_WEBSITE",description:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").VIEW_WEB_DESCRIPTION,"data-radio-testid":"VIEW_WEBSITE_OPTION"}];t?(e.push({label:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").VIEW_ON_FACEBOOK_LABEL,value:"VIEW_ON_FACEBOOK",description:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").VIEW_ON_FACEBOOK_DESCRIPTION}),o("AdsLeadGenFormEditorFunnelLogger").appendAction(o("AdsLeadGenFormEditorFunnelLoggerConstants").FUNNEL_LOGGING_EVENTS.SELECT_MESSAGE_FOR_LEADS_CALL_TO_ACTION_VIEW_FILE)):e.push({label:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").DOWNLOAD_LABEL,value:"DOWNLOAD"}),e.push({label:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").CALL_BIZ_LABEL,value:"CALL_BUSINESS",description:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").CALL_BIZ_DESCRIPTION}),r("qex")._("1209"),r("gkx")("19054");function d(){return o("ClickToWhatsAppFeatureGating").isInWAInInstantFormMessengerCTAAllowlist()}function m(e){e.push({label:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").WHATSAPP_LABEL,value:"WHATSAPP",description:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").WHATSAPP_DESCRIPTION,"data-radio-testid":"WHATSAPP_OPTION"}),o("AdsLeadGenFormEditorFunnelLogger").appendAction(o("AdsLeadGenFormEditorFunnelLoggerConstants").FUNNEL_LOGGING_EVENTS.SELECT_MESSAGE_FOR_LEADS_CALL_TO_ACTION_WHATSAPP),o("AdsLeadGenFormEditorUtils").logToPowerEditor("lead_gen_thank_you_page_whatsapp_cta_shown",i,s,u)}function p(e){e.push({label:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").getBookOnWebsiteOptionName(),value:"BOOK_ON_WEBSITE",description:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").BOOK_ON_WEBSITE_DESCRIPTION,"data-radio-testid":"BOOK_ON_WEBSITE_OPTION"}),o("AdsLeadGenFormEditorFunnelLogger").appendAction(o("AdsLeadGenFormEditorFunnelLoggerConstants").FUNNEL_LOGGING_EVENTS.ADD_FORM_CTA_OPTION_BOOK_ON_WEBSITE),o("AdsLeadGenFormEditorUtils").logToPowerEditor("lead_gen_thank_you_page_book_on_website_cta_shown",i,s,u)}function _(e){e.push({label:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").P2B_MESSENGER_LABEL,value:"P2B_MESSENGER",description:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").P2B_MESSENGER_DESCRIPTION}),o("AdsLeadGenFormEditorFunnelLogger").appendAction(o("AdsLeadGenFormEditorFunnelLoggerConstants").FUNNEL_LOGGING_EVENTS.SELECT_MESSAGE_FOR_LEADS_CALL_TO_ACTION_P2B_MESSENGER),o("AdsLeadGenFormEditorUtils").logToPowerEditor("lead_gen_thank_you_page_messenger_cta_shown",i,s,u)}return(r("gkx")("12890")===!0||r("qex")._("168")===!0)&&p(e),o("ClickToWhatsAppFeatureGating").shouldShowWhatsAppOption(l,u,c,!0)&&m(e),d()&&_(e),n&&!a&&(e.push({label:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").PROMO_CODE_LABEL,value:"PROMO_CODE",description:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").PROMO_CODE_DESCRIPTION}),o("AdsLeadGenFormEditorFunnelLogger").appendAction(o("AdsLeadGenFormEditorFunnelLoggerConstants").FUNNEL_LOGGING_EVENTS.SELECT_MESSAGE_FOR_LEADS_CALL_TO_ACTION_GATED_PROMO_CODE)),e};function _(e){var t,n,a=e.pageID,i=e.canSeeGatedContent,l=e.canSeeGatedPromoCode,u=e.hasConditionalLogic,_=e.thankYouPageID,f=e.page,g=e.account,h=e.onThankYouPageButtonTypeChange,y=e.thankYouPageSpec,C=e.onTogglePromoCodeWithWebsiteVisit,b=e.onShouldLinkToCatalogChange,v=e.errors,S=e.onPromoCodeChange,R=o("RelayHooks").useLazyLoadQuery(m,{id:a!=null?a:""}),L=(R==null||(t=R.node)==null?void 0:t.is_eligible_for_mbs_ctwa_instant_form)===!0,E=p(i,l,u,_,f,a,g==null?void 0:g.account_id,L),k=r("gkx")("2288"),I=r("AdsLeadGenFormRedesignExperiment").canSeeLinkToCatalog;d(function(){I&&o("AdsLeadGenFormEditorFunnelLogger").appendAction(o("AdsLeadGenFormEditorFunnelLoggerConstants").FUNNEL_LOGGING_EVENTS.CAN_SEE_CATALOG_CHECKBOX)},[I]);var T=function(t){h(t?"VIEW_WEBSITE":"NONE")},D=y.button_type==="NONE"?[]:E,x=c.jsxs("div",{children:[c.jsxs("div",{children:[c.jsxs(r("GeoBaseText.react"),{color:"heading",size:"header4",children:[o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").CTA_TYPE_LABEL," u2022"," "]}),c.jsx(r("GeoBaseText.react"),{color:"placeholder",size:"header4",weight:"normal",children:s._(/*BTDS*/"Recommended")})]}),c.jsx(r("GeoBaseText.react"),{color:"placeholder",size:"valueDescription",children:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").CTA_DESCRIPTION})]}),$=c.jsx(r("GeoBaseText.react"),{color:"heading",size:"header4",children:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").CTA_TYPE_LABEL}),P=y.button_type==="VIEW_WEBSITE",N=(r("AdsLeadGenFormRedesignExperiment").isConsumerPackagedGoodsVertical||r("AdsLeadGenFormRedesignExperiment").isEcommerceVertical)&&r("justknobx")._("1506");return d(function(){var e;P&&(((e=y.gated_promo)==null?void 0:e.online_promo_code)!=null||N)&&C(!0)},[P,(n=y.gated_promo)==null?void 0:n.online_promo_code,C,N]),c.jsxs("div",{className:"_3-8z _3-97 _3-8_",children:[c.jsxs(r("GeoFlexbox.react"),{alignItems:"start",justifyContent:"space-between",children:[k?x:$,k&&c.jsx(r("GeoSwitch.react"),{isLabelHidden:!0,label:s._(/*BTDS*/"Toggle thank you page CTA"),value:y.button_type!=="NONE",xstyle:r("geoMargin").start4,onChange:T})]}),c.jsx(r("GeoRadioList.react"),{"data-testid":void 0,label:s._(/*BTDS*/""),value:y.button_type,onChange:h,children:D.map(function(e){var t;return c.jsxs("div",{children:[c.jsx(r("GeoRadioListItem.react"),babelHelpers.extends({},e,{"data-testid":void 0})),e.value==="VIEW_WEBSITE"&&P&&I&&c.jsx(r("GeoCheckboxInput.react"),{description:s._(/*BTDS*/"Send people to your websiteu2019s page for the product selected in the ad."),label:s._(/*BTDS*/"Link to a product page from your catalog"),value:y.should_link_to_catalog===!0,xstyle:[r("geoMargin").start24,r("geoMargin").top4],onChange:b}),e.value==="VIEW_WEBSITE"&&P&&l&&!u&&c.jsxs(r("GeoFlexbox.react"),{direction:"column",xstyle:r("geoMargin").start24,children:[c.jsx(r("GeoCheckboxInput.react"),{description:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").WEBSITE_VISIT_WITH_PROMO_CODE_CHECKBOX_DESCRIPTION,label:o("AdsLeadGenFormEditorContentThankYouPageSectionV2Contents").WEBSITE_VISIT_WITH_PROMO_CODE_CHECKBOX_LABEL,value:y.enable_promo_code_with_web===!0,onChange:C}),y.enable_promo_code_with_web===!0&&c.jsx(r("GeoFlexbox.react"),{direction:"column",xstyle:r("geoMargin").start24,children:c.jsx(r("AdsLeadGenFormEditorThankYouPageGatedPromoCodeSectionContainer.react"),{hideOfferURLField:!0,offerURL:"",offerURLError:"",promoCode:(y==null||(t=y.gated_promo)==null?void 0:t.online_promo_code)||"",promoCodeError:o("AdsLeadGenFormEditorUtils").getErrorMessage(v,""+r("AdsLeadGenFormEditorValidationFields").THANK_YOU_PAGE_ONLINE_OFFER_CODE+(_||"")),onOfferURLChange:function(){},onPromoCodeChange:S})})]})]},e.value)})})]})}_.displayName=_.name+" [from "+i.id+"]",l.default=_}),226);
-----
AdsLeadGenFormEditorThankYouPageCTARadioButtonRowMBSWAEligibleQuery.graphql",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"id"}],t=[{kind:"Variable",name:"id",variableName:"id"}],n={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"is_eligible_for_mbs_ctwa_instant_form",storageKey:null}],type:"Page",abstractKey:null};return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"AdsLeadGenFormEditorThankYouPageCTARadioButtonRowMBSWAEligibleQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[n],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"AdsLeadGenFormEditorThankYouPageCTARadioButtonRowMBSWAEligibleQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},n,{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}]},params:{id:"25417900137834010",metadata:{},name:"AdsLeadGenFormEditorThankYouPageCTARadioButtonRowMBSWAEligibleQuery",operationKind:"query",text:null}}})();a.exports=e}),null);
-----