"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[1042],{3222:function(e,t,o){o.d(t,{Z:function(){return r}});var n=o(6252),d=o(3577);const a={class:"no-items-container"};function l(e,t,o,l,s,i){return(0,n.wg)(),(0,n.iD)("div",a,[(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 s={name:"NoItems",props:{withShadow:{type:Boolean,default:!0}}},i=o(3744);const u=(0,i.Z)(s,[["render",l],["__scopeId","data-v-4856c4d7"]]);var r=u},1042: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 a(e,t,o,a,l,s){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.isLoading?((0,n.wg)(),(0,n.j4)(i,{key:0})):l.feed?.length?((0,n.wg)(),(0,n.j4)(r,{key:2,results:l.feed,filter:o.filter,sources:{youtube:!0},"selected-result":l.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=>l.selectedResult=e),onPlay:t[5]||(t[5]=t=>e.$emit("play",t)),onPlayWithOpts:t[6]||(t[6]=t=>e.$emit("play-with-opts",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 l=o(3222),s=o(6791),i=o(1602),u=o(8637),r={mixins:[u.Z],emits:["add-to-playlist","download","download-audio","open-channel","play","play-with-opts"],components:{Loading:s.Z,NoItems:l.Z,Results:i.Z},props:{filter:{type:String,default:null},loading:{type:Boolean,default:!1}},data(){return{feed:[],loading_:!1,selectedResult:null}},computed:{isLoading(){return this.loading_||this.loading}},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()}},p=o(3744);const c=(0,p.Z)(r,[["render",a],["__scopeId","data-v-0a5cd0e6"]]);var f=c}}]);
//# sourceMappingURL=1042.10aafb65.js.map