"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[4074],{"./public/app/features/folders/state/navModel.ts":(e,a,s)=>{function r(e){const a={icon:"folder",id:"manage-folder",subTitle:"Manage folder dashboards and permissions",url:"",text:e.title,breadcrumbs:[{title:"Dashboards",url:"dashboards"}],children:[{active:!1,icon:"apps",id:`folder-dashboards-${e.uid}`,text:"Dashboards",url:e.url}]};return a.children.push({active:!1,icon:"library-panel",id:`folder-library-panels-${e.uid}`,text:"Panels",url:`${e.url}/library-panels`}),e.canAdmin&&a.children.push({active:!1,icon:"lock",id:`folder-permissions-${e.uid}`,text:"Permissions",url:`${e.url}/permissions`}),e.canSave&&a.children.push({active:!1,icon:"cog",id:`folder-settings-${e.uid}`,text:"Settings",url:`${e.url}/settings`}),a}function n(e){const a=r({id:1,uid:"loading",title:"Loading",url:"url",canSave:!0,canEdit:!0,canAdmin:!0,version:0});return a.children[e].active=!0,{main:a,node:a.children[e]}}s.d(a,{B:()=>r,_:()=>n})},"./public/app/features/search/components/DashboardListPage.tsx":(e,a,s)=>{s.r(a),s.d(a,{DashboardListPage:()=>v,default:()=>m});var r=s("./node_modules/react/index.js"),n=s("./node_modules/react-use/esm/useAsync.js"),d=s("./node_modules/react-redux/es/index.js"),t=s("./packages/grafana-data/src/index.ts"),o=s("./packages/grafana-runtime/src/index.ts"),i=s("./public/app/core/selectors/navModel.ts"),l=s("./public/app/core/components/Page/Page.tsx"),c=s("./public/app/core/services/backend_srv.ts"),u=s("./public/app/features/folders/state/navModel.ts");var p=s("./public/app/features/search/components/ManageDashboards.tsx"),h=s("./node_modules/react/jsx-runtime.js");const v=(0,r.memo)((({navModel:e,match:a,location:s})=>{var r;const{loading:d,value:i}=(0,n.Z)((()=>{const r=a.params.uid,n=s.pathname;return r&&n.startsWith("/dashboards")?(e=>c.ae.getFolderByUid(e).then((e=>{const a=(0,u.B)(e);return a.children[0].active=!0,{folder:e,folderNav:a}})))(r).then((({folder:a,folderNav:r})=>{const n=t.locationUtil.stripBaseFromUrl(a.url);return n!==s.pathname&&o.locationService.push(n),{folder:a,pageNavModel:Object.assign({},e,{main:r})}})):Promise.resolve({pageNavModel:e})}),[a.params.uid]);return(0,h.jsx)(l.Z,{navModel:null!==(r=null==i?void 0:i.pageNavModel)&&void 0!==r?r:e,children:(0,h.jsx)(l.Z.Contents,{isLoading:d,children:(0,h.jsx)(p.Z,{folder:null==i?void 0:i.folder})})})}));v.displayName="DashboardListPage";const m=(0,d.connect)((e=>({navModel:(0,i.h)(e.navIndex,"manage-dashboards")})))(v)}}]);
//# sourceMappingURL=DashboardListPage.8128b05ac04b15cbf98d.js.map