CatalogCreationBusinessSelectorV2.react",["fbt","CatalogBusinessSelector.react","CatalogBusinessSelectorWithGraphQL.react","CatalogCreationBusinessSelectorV2Query.graphql","CommerceManagerHooks","CreateBusinessAccountViewController.brands","GeoLink.react","Timezone","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.useCallback,p=d.useEffect,_=d.useState,f=d.useTransition,g=e!==void 0?e:e=n("CatalogCreationBusinessSelectorV2Query.graphql");function h(e){var t,n,a=o("react-compiler-runtime").c(30),i=e.isDisabled,l=e.isLocalProducts,s=e.onBusinessSelected,u=e.prefilledBusinessID,d=l===void 0?!1:l,m=f(),h=m[0],C=m[1],b=_(!1),v=b[0],S=b[1],R=f(),L=R[1],E=_(null),k=E[0],I=E[1],T=u!=null,D;a[0]!==d||a[1]!==T?(D={hasBusiness:T,isLocalProducts:d},a[0]=d,a[1]=T,a[2]=D):D=a[2];var x=k!=null&&k===u?"network-only":"store-or-network",$;a[3]!==x?($={fetchPolicy:x},a[3]=x,a[4]=$):$=a[4];var P=o("CommerceManagerHooks").useCommerceManagerLazyQuery(g,D,$),N=u!=null?u:(t=P.viewer)==null||(t=t.businessForPreSelection)==null||(t=t.nodes[0])==null?void 0:t.id,M;a[5]!==s?(M=function(t){C(function(){s(t)})},a[5]=s,a[6]=M):M=a[6];var w=M,A,F;a[7]!==w||a[8]!==u||a[9]!==N?(A=function(){u==null&&N!=null&&w(N)},F=[w,u,N],a[7]=w,a[8]=u,a[9]=N,a[10]=A,a[11]=F):(A=a[10],F=a[11]),p(A,F);var O;a[12]!==w?(O=function(t){L(function(){return I(t)}),w(t),S(!1)},a[12]=w,a[13]=O):O=a[13];var B=O,W;a[14]!==N?(W=N==null?y(function(){return S(!0)}):void 0,a[14]=N,a[15]=W):W=a[15];var q=W,U;a[16]!==v||a[17]!==B?(U=v&&c.jsx(r("CreateBusinessAccountViewController.brands"),{creationSource:"create_catalog",customRequestHandler:B,entryPoint:"catalog_manager_catalog_setup",fullName:"",isDialogOpen:!0,timezoneID:(o("Timezone").getEnvironmentTimezoneID()||o("Timezone").PST8PDT).toString(),onDialogClose:function(){return S(!1)}}),a[16]=v,a[17]=B,a[18]=U):U=a[18];var V;if(a[19]!==((n=P.viewer)==null||(n=n.ad_businesses)==null?void 0:n.nodes)){var H,G,z;V=(H=(G=P.viewer)==null||(G=G.ad_businesses)==null?void 0:G.nodes)!=null?H:[],a[19]=(z=P.viewer)==null||(z=z.ad_businesses)==null?void 0:z.nodes,a[20]=V}else V=a[20];var j=i===!0||h,K;a[21]!==w||a[22]!==N||a[23]!==V||a[24]!==j||a[25]!==q?(K=c.jsx(r("CatalogBusinessSelectorWithGraphQL.react"),{adBusinesses:V,isDisabled:j,label:o("CatalogBusinessSelector.react").selectBusinessIdLabel,placeholder:o("CatalogBusinessSelector.react").selectBusinessIdMessage,selectedBusinessID:N,warningMessage:q,onBusinessSelected:w}),a[21]=w,a[22]=N,a[23]=V,a[24]=j,a[25]=q,a[26]=K):K=a[26];var Q;return a[27]!==U||a[28]!==K?(Q=c.jsxs(c.Fragment,{children:[U,K]}),a[27]=U,a[28]=K,a[29]=Q):Q=a[29],Q}function y(e){return s._(/*BTDS*/"A Business ID is required to connect your account. {create business link}",[s._param("create business link",c.jsx(r("GeoLink.react"),{onClick:e,children:"Create Business ID"}))])}y.displayName=y.name+" [from "+i.id+"]",l.default=h}),226);
-----
CatalogCreationBusinessSelectorV2Query_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="25307797455546951"}),null);
-----
-----
CatalogCreationBusinessSelectorV2Query_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="25307797455546951"}),null);
-----