"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[7616],{28893(T,i,s){s.r(i),s.d(i,{PlaylistNewPage:()=>n,default:()=>d});var t=s(74848),o=s(96540),E=s(52358),P=s(98391),l=s(5246),y=s(37336),v=s(69019),D=s(73277),c=s(59578),p=s(13718),O=s(14289);const n=()=>{const[M]=(0,o.useState)((0,O.aV)()),[u]=(0,y.Dp)(),{isAvailable:R,repositories:C}=(0,D.W)(c.CC.playlist),[a,g]=(0,o.useState)(void 0),[e,_]=(0,o.useState)(),h=async r=>{if(a){_(r);return}await u({playlist:r}),P.Ny.push("/playlists")},A={text:(0,E.t)("playlist.playlist-new-page.page-nav.text.new-playlist","New playlist"),subTitle:"A playlist rotates through a pre-selected list of dashboards. A playlist can be a great way to build situational awareness, or just show off your metrics to your team or visitors."};return(0,t.jsxs)(l.Y,{navId:"dashboards/playlists",pageNav:A,children:[(0,t.jsx)(l.Y.Contents,{children:(0,t.jsx)(p.$,{onSubmit:h,playlist:M,showRepositorySelect:R,repositories:C,selectedRepository:a,onRepositoryChange:g})}),e&&a&&(0,t.jsx)(v.h,{resource:e,title:e.spec?.title??"",action:"create",repositoryName:a,onDismiss:()=>_(void 0)})]})},d=n}}]);

//# sourceMappingURL=PlaylistNewPage.3fff6af5fb21893d4c38.js.map