"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[2804],{3222:function(e,t,s){s.d(t,{Z:function(){return r}});var n=s(6252),l=s(3577);const o={class:"no-items-container"};function d(e,t,s,d,a,u){return(0,n.wg)(),(0,n.iD)("div",o,[(0,n._)("div",{class:(0,l.C_)(["no-items fade-in",{shadow:s.withShadow}])},[(0,n.WI)(e.$slots,"default",{},void 0,!0)],2)])}var a={name:"NoItems",props:{withShadow:{type:Boolean,default:!0}}},u=s(3744);const i=(0,u.Z)(a,[["render",d],["__scopeId","data-v-4856c4d7"]]);var r=i},2804:function(e,t,s){s.r(t),s.d(t,{default:function(){return p}});var n=s(6252);const l={class:"media-youtube-feed"};function o(e,t,s,o,d,a){const u=(0,n.up)("Loading"),i=(0,n.up)("NoItems"),r=(0,n.up)("Results");return(0,n.wg)(),(0,n.iD)("div",l,[d.loading?((0,n.wg)(),(0,n.j4)(u,{key:0})):d.feed?.length?((0,n.wg)(),(0,n.j4)(r,{key:2,results:d.feed,filter:s.filter,sources:{youtube:!0},"selected-result":d.selectedResult,onSelect:t[0]||(t[0]=e=>d.selectedResult=e),onPlay:t[1]||(t[1]=t=>e.$emit("play",t))},null,8,["results","filter","selected-result"])):((0,n.wg)(),(0,n.j4)(i,{key:1,"with-shadow":!1},{default:(0,n.w5)((()=>[(0,n.Uk)(" No videos found. ")])),_:1}))])}var d=s(3222),a=s(6791),u=s(382),i=s(8637),r={emits:["play"],mixins:[i.Z],components:{Loading:a.Z,NoItems:d.Z,Results:u.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=s(3744);const f=(0,c.Z)(r,[["render",o],["__scopeId","data-v-1c632107"]]);var p=f}}]);
//# sourceMappingURL=2804.c59fb840.js.map