import{I as m}from"./ItemsListing-ByrUsYKd.js";import{d as p,r,s as n,m as c,v as t,a$ as y,q as b,h as _,u as i,M as f,o as v}from"./index-CD7iYaFT.js";import"./Container-ClW3AMEw.js";import"./index-CBho6rsP.js";import"./VContainer-DFqPxZ0T.js";/* empty css              */import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-B7AWyK9d.js";import"./VToolbar-BQejIjUR.js";import"./VBtn-B0XatuYF.js";import"./Button-BUjpiwEZ.js";import"./ListItem-C-HNqEeC.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-Dl2aFjrE.js";import"./VInput-DDFZ8lhb.js";import"./MediaItemThumb-BVMzVj0K.js";import"./PanelviewItemCompact-DmP5jPAL.js";import"./VSpacer-B8t0Vh55.js";import"./VTextField-CVfOZKc3.js";import"./VInfiniteScroll-DHXPR3PY.js";import"./layout-BCm0QQDS.js";import"./VRow-DFe5cA7D.js";import"./VVirtualScroll-BREm3RjH.js";import"./VAlert-cuze2JsR.js";const G=p({name:"Audiobooks",__name:"LibraryAudiobooks",setup(k){const e=r(!1),a=r(n.libraryAudiobooksCount),l=["name","name_desc","sort_name","sort_name_desc","timestamp_added","timestamp_added_desc","timestamp_modified","timestamp_modified_desc","last_played","last_played_desc","play_count","play_count_desc"],u=async function(o){return e.value=!1,d(o),await t.getLibraryAudiobooks(o.favoritesOnly||void 0,o.search,o.limit,o.offset,o.sortBy)},d=async function(o){if(!o.favoritesOnly){a.value=n.libraryAudiobooksCount;return}a.value=await t.getLibraryAudiobooksCount(o.favoritesOnly||!1)};return c(()=>{const o=t.subscribe(y.MEDIA_ITEM_ADDED,s=>{s.object_id?.startsWith("library://audiobook")&&(e.value=!0)});b(o)}),(o,s)=>(v(),_(m,{itemtype:"audiobooks",path:"libraryaudiobooks","show-duration":!1,"show-provider":!0,"show-favorites-only-filter":!0,"load-paged-data":u,"show-library":!0,"sort-keys":l,"update-available":e.value,title:o.$t("audiobooks"),"allow-key-hooks":!0,"show-search-button":!0,icon:"mdi-book-play-outline","restore-state":!0,total:a.value,"extra-menu-items":[{label:"sync_now",icon:"mdi-sync",action:()=>{i(t).startSync([i(f).AUDIOBOOK])},overflowAllowed:!0,disabled:i(t).syncTasks.value.length>0}]},null,8,["update-available","title","total","extra-menu-items"]))}});export{G as default};
