"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[46634],{46634:function(e,t,r){r.r(t),r.d(t,{deleteItem:function(){return c},deleteLyrics:function(){return f}}),r(78557),r(90076);var n=r(11444),i=r(41177),a=r(47602),l=r(70267),u=r(5898),o=r(67430);function s(e){return(0,i.A)(e)}function c(e){var t=e.item,r=t.SeasonId||t.SeriesId||t.ParentId,i=o.tF.getApiClient(t.ServerId);return(0,a.A)(function(e){if(e.Type===n.D.Series){var t=e.RecursiveItemCount;return{title:u.Ay.translate("HeaderDeleteSeries"),text:u.Ay.translate("ConfirmDeleteSeries",t),confirmText:u.Ay.translate("DeleteEntireSeries",t),primary:"delete"}}return{title:u.Ay.translate("HeaderDeleteItem"),text:u.Ay.translate("ConfirmDeleteItem"),confirmText:u.Ay.translate("Delete"),primary:"delete"}}(t)).then((function(){return i.deleteItem(t.Id).then((function(){e.navigate&&(r?l.appRouter.showItem(r,t.ServerId):l.appRouter.goHome())}),(function(e){var t=function(){return Promise.reject(e)};return s(u.Ay.translate("ErrorDeletingItem")).then(t,t)}))}))}function f(e){return(0,a.A)({title:u.Ay.translate("HeaderDeleteLyrics"),text:u.Ay.translate("ConfirmDeleteLyrics"),confirmText:u.Ay.translate("Delete"),primary:"delete"}).then((function(){var t=o.tF.getApiClient(e.ServerId);return t.ajax({url:t.getUrl("Audio/"+e.Id+"/Lyrics"),type:"DELETE"}).catch((function(e){var t=function(){return Promise.reject(e)};return s(u.Ay.translate("ErrorDeletingLyrics")).then(t,t)}))}))}t.default={deleteItem:c,deleteLyrics:f}}}]);