"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[4364,6640],{4364:function(a,e,t){t.r(e),t.d(e,{default:function(){return c}});var i=t(6252);const n={class:"media-file-browser"};function s(a,e,t,s,l,r){const d=(0,i.up)("Loading"),o=(0,i.up)("Browser");return(0,i.wg)(),(0,i.iD)("div",n,[r.isLoading?((0,i.wg)(),(0,i.j4)(d,{key:0})):((0,i.wg)(),(0,i.j4)(o,{key:1,"is-media":!0,filter:a.filter,"has-back":!0,homepage:l.mediaDirs,onBack:e[0]||(e[0]=e=>a.$emit("back")),onPathChange:e[1]||(e[1]=e=>a.$emit("path-change",e)),onPlay:e[2]||(e[2]=e=>a.$emit("play",e))},null,8,["filter","homepage"]))])}var l=t(8409),r=t(6791),d=t(6640),o={mixins:[d["default"]],components:{Browser:l.Z,Loading:r.Z},data(){return{loading_:!1,mediaDirs:{}}},computed:{isLoading(){return this.loading_||this.loading}},methods:{async refresh(){this.loading_=!0;try{this.mediaDirs=await this.request(`${this.mediaPlugin}.get_media_dirs`)}finally{this.loading_=!1}}},async mounted(){const a=this.getUrlArgs().path;a&&await this.$emit("path-change",a),await this.refresh()}},u=t(3744);const h=(0,u.Z)(o,[["render",s],["__scopeId","data-v-b416fbc4"]]);var c=h},6640:function(a,e,t){t.r(e),t.d(e,{default:function(){return l}});var i=t(8637),n={mixins:[i.Z],emits:["add-to-playlist","back","create-playlist","download","download-audio","path-change","play","remove-from-playlist","remove-playlist","rename-playlist"],props:{filter:{type:String,default:""},loading:{type:Boolean,default:!1},mediaPlugin:{type:String},selectedPlaylist:{default:null},selectedChannel:{default:null}},data(){return{loading_:!1}},computed:{isLoading(){return this.loading||this.loading_}}};const s=n;var l=s}}]);
//# sourceMappingURL=4364.a86699e9.js.map