DeveloperAppDashboardSidebarNavigationV2.react",["fbt","DeveloperAppControllerContext","DeveloperAppDashboardSidebarNavigationV2Query.graphql","DeveloperAppDashboardSidebarUtils","GeoLink.react","GeoSidebarNavigation.react","GeoSidebarSection.react","RelayHooks","URI","XDeveloperAppControllerRouteBuilder","XFBApplicationProductRouteUtils.facebook","first","getCurrentAppID","react","useToggle"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c,d=c||(c=o("react")),m=c,p=m.useEffect,_=m.useState,f=":";function g(e){return e.map(function(e){var t,n,a;return{productTitle:(t=e.product_title)!=null?t:"",productLink:new(u||(u=r("URI")))((n=e.product_link)!=null?n:""),productRoute:(a=o("XFBApplicationProductRouteUtils.facebook").toJSEnum(e.product_route))!=null?a:"dashboard",productChildren:e.product_children.map(function(e){var t,n,o,a,i;return{title:(t=e.title)!=null?t:"",description:null,link:new(u||(u=r("URI")))((n=e.link)!=null?n:""),tab:(o=e.tab)!=null?o:"",badgeCount:(a=e.badge_count)!=null?a:0,isHiddenSubTab:(i=e.is_hidden_sub_tab)!=null?i:!1}})}})}function h(t){var a,i,l,u=t.appID,c=t.currentProduct,m=t.currentTab,h=o("RelayHooks").useLazyLoadQuery(e!==void 0?e:e=n("DeveloperAppDashboardSidebarNavigationV2Query.graphql"),{appID:u}),y=h.fetch__Application,C=(a=y.is_added_product_section_visible)!=null?a:!1,b=g(y.base_products),v=g(y.used_products),S=g(y.footer_products),R=_(m!=null?c+f+m:c),L=R[0],E=R[1],k=r("useToggle")(!1),I=k[0],T=o("DeveloperAppControllerContext").useDeveloperAppControllerContext(),D=T.setPage,x=function(t){if(E(t),o("DeveloperAppDashboardSidebarUtils").ShouldUseAppControllerContainer()){var e,n=t.split(f),a=(e=r("first")(n))!=null?e:"",i=n[1];D(a,i)}};p(function(){if(o("DeveloperAppDashboardSidebarUtils").ShouldUseAppControllerContainer()){var e=function(){var e=window.location.pathname,t=e.split("/"),n=t[3],r=t[4];n!=null&&(D(n,r),E(r?n+f+r:n))};return window.addEventListener("popstate",e),function(){window.removeEventListener("popstate",e)}}},[D]);var $=(i=r("XDeveloperAppControllerRouteBuilder").buildUri({app_id:(l=r("getCurrentAppID")())!=null?l:0,page:"dashboard"}).setFragment("addProduct"))==null?void 0:i.toString(),P=d.jsx(r("GeoLink.react"),{href:$,children:s._(/*BTDS*/"Add Product")});return d.jsxs(r("GeoSidebarNavigation.react"),{footer:null,isCollapsed:I,onChange:x,value:L,children:[d.jsx(r("GeoSidebarSection.react"),{label:"",children:d.jsx(o("DeveloperAppDashboardSidebarUtils").DeveloperAppDashboardSidebarNavigationSection,{section:b})}),C?d.jsx(r("GeoSidebarSection.react"),{label:s._(/*BTDS*/"Products"),link:P,children:d.jsx(o("DeveloperAppDashboardSidebarUtils").DeveloperAppDashboardSidebarNavigationSection,{section:v})}):null,S.length>0?d.jsx(r("GeoSidebarSection.react"),{label:s._(/*BTDS*/"Activity log"),children:d.jsx(o("DeveloperAppDashboardSidebarUtils").DeveloperAppDashboardSidebarNavigationSection,{section:S})}):null]})}h.displayName=h.name+" [from "+i.id+"]",l.default=h}),226);
-----
DeveloperAppDashboardSidebarNavigationV2Query.graphql",["DeveloperAppDashboardSidebarNavigationV2Query_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"appID"}],t=[{kind:"Variable",name:"id",variableName:"appID"}],r={alias:null,args:null,kind:"ScalarField",name:"is_added_product_section_visible",storageKey:null},o=[{alias:null,args:null,kind:"ScalarField",name:"product_title",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"product_link",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"product_route",storageKey:null},{alias:null,args:null,concreteType:"XFBDeveloperAppSideNavigationChildItem",kind:"LinkedField",name:"product_children",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"title",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"link",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tab",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"badge_count",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_hidden_sub_tab",storageKey:null}],storageKey:null}],a={alias:null,args:null,concreteType:"XFBDeveloperAppSideNavigationItem",kind:"LinkedField",name:"base_products",plural:!0,selections:o,storageKey:null},i={alias:null,args:null,concreteType:"XFBDeveloperAppSideNavigationItem",kind:"LinkedField",name:"used_products",plural:!0,selections:o,storageKey:null},l={alias:null,args:null,concreteType:"XFBDeveloperAppSideNavigationItem",kind:"LinkedField",name:"footer_products",plural:!0,selections:o,storageKey:null};return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"DeveloperAppDashboardSidebarNavigationV2Query",selections:[{kind:"RequiredField",field:{alias:null,args:t,concreteType:"Application",kind:"LinkedField",name:"fetch__Application",plural:!1,selections:[r,a,i,l],storageKey:null},action:"THROW",path:"fetch__Application"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"DeveloperAppDashboardSidebarNavigationV2Query",selections:[{alias:null,args:t,concreteType:"Application",kind:"LinkedField",name:"fetch__Application",plural:!1,selections:[r,a,i,l,{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}]},params:{id:n("DeveloperAppDashboardSidebarNavigationV2Query_facebookRelayOperation"),metadata:{},name:"DeveloperAppDashboardSidebarNavigationV2Query",operationKind:"query",text:null}}})();a.exports=e}),null);
-----
DeveloperAppDashboardSidebarNavigationV2Query_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="25379427971681370"}),null);
-----