"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[9472],{3222:function(e,t,o){o.d(t,{Z:function(){return r}});var n=o(6252),d=o(3577);const l={class:"no-items-container"};function s(e,t,o,s,a,i){return(0,n.wg)(),(0,n.iD)("div",l,[(0,n._)("div",{class:(0,d.C_)(["no-items fade-in",{shadow:o.withShadow}])},[(0,n.WI)(e.$slots,"default",{},void 0,!0)],2)])}var a={name:"NoItems",props:{withShadow:{type:Boolean,default:!0}}},i=o(3744);const u=(0,i.Z)(a,[["render",s],["__scopeId","data-v-4856c4d7"]]);var r=u},9472:function(e,t,o){o.r(t),o.d(t,{default:function(){return f}});var n=o(6252);const d={class:"media-youtube-feed"};function l(e,t,o,l,s,a){const i=(0,n.up)("Loading"),u=(0,n.up)("NoItems"),r=(0,n.up)("Results");return(0,n.wg)(),(0,n.iD)("div",d,[s.loading?((0,n.wg)(),(0,n.j4)(i,{key:0})):s.feed?.length?((0,n.wg)(),(0,n.j4)(r,{key:2,results:s.feed,filter:o.filter,sources:{youtube:!0},"selected-result":s.selectedResult,onAddToPlaylist:t[0]||(t[0]=t=>e.$emit("add-to-playlist",t)),onDownload:t[1]||(t[1]=t=>e.$emit("download",t)),onDownloadAudio:t[2]||(t[2]=t=>e.$emit("download-audio",t)),onOpenChannel:t[3]||(t[3]=t=>e.$emit("open-channel",t)),onSelect:t[4]||(t[4]=e=>s.selectedResult=e),onPlay:t[5]||(t[5]=t=>e.$emit("play",t))},null,8,["results","filter","selected-result"])):((0,n.wg)(),(0,n.j4)(u,{key:1,"with-shadow":!1},{default:(0,n.w5)((()=>[(0,n.Uk)(" No videos found. ")])),_:1}))])}var s=o(3222),a=o(6791),i=o(1784),u=o(8637),r={mixins:[u.Z],emits:["add-to-playlist","download","download-audio","open-channel","play"],components:{Loading:a.Z,NoItems:s.Z,Results:i.Z},props:{filter:{type:String,default:null}},data(){return{feed:[],loading:!1,selectedResult:null}},methods:{async loadFeed(){this.loading=!0;try{this.feed=(await this.request("youtube.get_feed")).map((e=>({...e,type:"youtube"})))}finally{this.loading=!1}}},mounted(){this.loadFeed()}},c=o(3744);const p=(0,c.Z)(r,[["render",l],["__scopeId","data-v-0131d440"]]);var f=p}}]);
//# sourceMappingURL=9472.3664c2f1.js.map