"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[6092],{1166:(e,t,n)=>{n.r(t),n.d(t,{StorageFolderPage:()=>v,default:()=>j,getPageNavFromSlug:()=>x,getRootContentNavModel:()=>p});n(76687);var a,r,l,s=n(68021),i=n(67273),o=n(3351),g=n(39756),d=n(55816),u=n(35562),c=n(28781),h=n(95670),f=n(52010);function v(e){var t;const n=null!==(t=e.match.params.slug)&&void 0!==t?t:"",v=(0,s.Z)((()=>(0,h.$)().list("content/"+n)),[n]),p=n.length>0?`g/${n}/`:"g/",j=x(n),m={main:{text:"C:"},node:{text:"Content",url:"/g"}};return(0,f.jsxs)(c.T,{navModel:m,pageNav:j,children:[!i.v.featureToggles.topnav&&(l||(l=(0,f.jsx)("div",{children:(0,f.jsx)(u.b,{title:"Enable the topnav feature toggle",children:"This page is designed assuming topnav is enabled"})}))),(()=>{if(v.value){return v.value.fields[0].values.toArray().map((e=>{let t=e;const n=t.indexOf(".")<0,a=!n&&t.endsWith(".json"),r=`${p}${t}`;return(0,f.jsxs)(o.Z,{href:n||a?r:void 0,children:[(0,f.jsx)(o.Z.Heading,{children:t}),(0,f.jsx)(o.Z.Figure,{children:(0,f.jsx)(g.J,{name:n?"folder":a?"gf-grid":"file-alt",size:"sm"})})]},t)}))}return v.loading?a||(a=(0,f.jsx)(d.$,{})):r||(r=(0,f.jsx)("div",{children:"?"}))})()]})}function x(e){const t=e.split("/");let n,a=[],r="g";for(let e=0;e<t.length;e++)r+=`/${t[e]}`,a.push({text:t[e],url:r,parentItem:n}),n=a[a.length-1];return n}function p(){return{main:{text:"C:"},node:{text:"Content",url:"/g"}}}const j=v}}]);
//# sourceMappingURL=StorageFolderPage.6f3aa327965be496492e.js.map