import{_ as L}from"./BAlert.vue_vue_type_script_setup_true_lang-BoLIpZFk-cCJ5v_dt.js";import{_ as R}from"./BButton.vue_vue_type_script_setup_true_lang-D5Eg7-Zv-DDRCX2AG.js";import{_ as v}from"./BButtonToolbar.vue_vue_type_script_setup_true_lang-CxCcFupr-CBdlhxg8.js";import{_ as y,d as k,h as $,o,b as s,a as n,c as _,g as d,t as a,w as r,e as l}from"./index-D02r7Zsc.js";import"./BLink.vue_vue_type_script_setup_true_lang-Ct47WhzE-DDPYis_D.js";import"./useDefaults-DESCdb0p-CFLjYrdG.js";import"./object-0ALvRU0O-3BORTTD-.js";import"./stringUtils-gJJ6T6UC-g5BZrMym.js";import"./BCloseButton.vue_vue_type_script_setup_true_lang-byZmQ_ot-CWP55Z5N.js";import"./BProgress.vue_vue_type_script_setup_true_lang-DDTA5_ZV-eRxVOfNj.js";import"./useColorVariantClasses-ZDE19TZw-Cvu7SygP.js";import"./index-C0p9vHHI-DoOEDIMw.js";import"./useId-t29UARy6-BH5d2231.js";import"./useShowHide-717t6y_D-BZTBbOpd.js";import"./classes-BW_GpXTu-AKwVND4h.js";import"./BSpinner.vue_vue_type_script_setup_true_lang-H1MzHypA-D8AXjJB0.js";import"./dom-DVb-f0ZG-Crdf0-mU.js";const w={data:function(){return{deleteReadingListModal:{content:this.$tm("readinglists.deleteReadingListModal"),method:"deleteReadingList",headerBg:"danger",type:"confirmModal",start:!1}}},computed:{readinglist:function(){let e=this.get("readinglists"),t=e.findIndex(m=>m.reading_list_id==this.$route.params.id);return t===-1?null:e[t]},records:function(){return this.readinglist?this.readinglist.reading_list_notice_ids:[]}},methods:{deleteReadingList:async function(){this.publish("showOverlay",!0);let e=await this.get("ws").deleteReadingList(this.get("sessionId"),this.readinglist.reading_list_id);this.publish("showOverlay",!1),e&&this.set("readinglists",this.get("readinglists").filter(t=>t.reading_list_id!==this.readinglist.reading_list_id)),this.$router.push({name:"readinglistslist"})}}},M={key:0},I={class:"d-flex align-items-center mb-3 m-1"},B={class:"h3 title text-secondary text-center mb-0 flex-grow-1 me-5"},C={class:"d-flex justify-content-center"};function x(e,t,m,N,V,i){const c=d("modal"),u=d("backbutton"),g=R,p=v,f=L,h=d("noticelist");return i.readinglist?(o(),k("div",M,[s(c,{modalInfos:e.deleteReadingListModal,onModal_deleteReadingList:i.deleteReadingList},null,8,["modalInfos","onModal_deleteReadingList"]),n("div",I,[s(u),n("h1",B,a(i.readinglist.reading_list_name),1)]),n("div",C,[s(p,null,{default:r(()=>[s(g,{variant:"outline-primary",onClick:t[0]||(t[0]=b=>e.$router.push({name:"addreadinglist",params:{id:i.readinglist.reading_list_id}}))},{default:r(()=>[t[2]||(t[2]=n("i",{class:"bi bi-pencil"},null,-1)),l(a(e.$t("readinglists.edit")),1)]),_:1}),s(g,{variant:"outline-danger",onClick:t[1]||(t[1]=b=>e.deleteReadingListModal.start=!e.deleteReadingListModal.start)},{default:r(()=>[t[3]||(t[3]=n("i",{class:"bi bi-trash"},null,-1)),l(a(e.$t("readinglists.delete")),1)]),_:1})]),_:1})]),i.records.length===0?(o(),_(f,{key:0,variant:"info",show:"",class:"m-1"},{default:r(()=>[l(a(e.$t("readinglists.noReadingListItems")),1)]),_:1})):(o(),_(h,{key:1,records:i.records},null,8,["records"]))])):$("",!0)}const W=y(w,[["render",x]]);export{W as default};
