"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[7462],{73072:function(e,t,o){o.d(t,{A:function(){return r}});var d=o(20641),n=o(90033);const a={class:"no-items-container"};function s(e,t,o,s,l,i){return(0,d.uX)(),(0,d.CE)("div",a,[(0,d.Lk)("div",{class:(0,n.C4)(["no-items fade-in",{shadow:o.withShadow}])},[(0,d.RG)(e.$slots,"default",{},void 0,!0)],2)])}var l={name:"NoItems",props:{withShadow:{type:Boolean,default:!0}}},i=o(66262);const u=(0,i.A)(l,[["render",s],["__scopeId","data-v-4856c4d7"]]);var r=u},87462:function(e,t,o){o.r(t),o.d(t,{default:function(){return h}});o(18111),o(22489);var d=o(20641);const n={class:"media-youtube-feed"};function a(e,t,o,a,s,l){const i=(0,d.g2)("Loading"),u=(0,d.g2)("NoItems"),r=(0,d.g2)("Results");return(0,d.uX)(),(0,d.CE)("div",n,[l.isLoading?((0,d.uX)(),(0,d.Wv)(i,{key:0})):s.feed?.length?((0,d.uX)(),(0,d.Wv)(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)),onAddToQueue:t[1]||(t[1]=t=>e.$emit("add-to-queue",t)),onDownload:t[2]||(t[2]=t=>e.$emit("download",t)),onDownloadAudio:t[3]||(t[3]=t=>e.$emit("download-audio",t)),onOpenChannel:t[4]||(t[4]=t=>e.$emit("open-channel",t)),onSelect:t[5]||(t[5]=e=>s.selectedResult=e),onPlay:t[6]||(t[6]=t=>e.$emit("play",t)),onPlayWithOpts:t[7]||(t[7]=t=>e.$emit("play-with-opts",t)),onScrollEnd:l.loadFeed,onView:t[8]||(t[8]=t=>e.$emit("view",t))},null,8,["results","filter","selected-result","onScrollEnd"])):((0,d.uX)(),(0,d.Wv)(u,{key:1,"with-shadow":!1},{default:(0,d.k6)(()=>[...t[9]||(t[9]=[(0,d.eW)(" No videos found. ",-1)])]),_:1}))])}o(44114),o(61701);var s=o(73072),l=o(81350),i=o(20388),u=o(91387),r={mixins:[u.A],emits:["add-to-playlist","add-to-queue","download","download-audio","open-channel","play","play-with-opts","view"],components:{Loading:l.A,NoItems:s.A,Results:i.A},props:{filter:{type:String,default:null},loading:{type:Boolean,default:!1}},data(){return{feed:[],firstLoad:!0,loading_:!1,page:1,selectedResult:null}},computed:{isLoading(){return(this.loading_||this.loading)&&this.firstLoad}},methods:{async loadFeed(){this.loading_=!0;try{this.feed.push(...(await this.request("youtube.get_feed",{page:this.page})).map(e=>({...e,type:"youtube"}))),this.firstLoad=!1,this.feed.length&&this.page++}finally{this.loading_=!1}}},mounted(){this.loadFeed()}},p=o(66262);const c=(0,p.A)(r,[["render",a],["__scopeId","data-v-22653802"]]);var h=c}}]);
//# sourceMappingURL=7462.e108f7c7.js.map