import{C as p}from"./ContentWithHeading.js";import{G as r,e as u}from"./GroupByList.js";import{L as b}from"./ListAlbums.js";import{_ as f,r as d,o as h,c as y,d as i,w as c,s as g,e as w,a as C,t as x}from"./index.js";import{T as k}from"./TabsMusic.js";import"./CoverArtwork.js";import"./ModalDialogAlbum.js";const a={load(e){const t=g.getters.settings_option_recently_added_limit;return w.search({type:"album",expression:"media_kind is music having track_count > 3 order by time_added desc",limit:t})},set(e,t){e.recently_added=new r(t.data.albums),e.recently_added.group(u("time_added",{direction:"desc"}))}},B={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:p,TabsMusic:k,ListAlbums:b},beforeRouteEnter(e,t,s){a.load(e).then(o=>{s(n=>a.set(n,o))})},beforeRouteUpdate(e,t,s){if(!this.recently_added.isEmpty()){s();return}const o=this;a.load(e).then(n=>{a.set(o,n),s()})},data(){return{recently_added:new r}}},R={class:"fd-page-with-tabs"},$=["textContent"];function v(e,t,s,o,n,A){const l=d("tabs-music"),m=d("list-albums"),_=d("content-with-heading");return h(),y("div",R,[i(l),i(_,null,{"heading-left":c(()=>[C("p",{class:"title is-4",textContent:x(e.$t("page.music.recently-added.title"))},null,8,$)]),content:c(()=>[i(m,{albums:n.recently_added},null,8,["albums"])]),_:1})])}const P=f(B,[["render",v]]);export{P as default};