import{_ as f,a as _}from"./BCarouselSlide.vue_vue_type_script_setup_true_lang-DEbdqyJV-DnmHZQC5.js";import{_ as g,d as r,h as o,o as e,a as y,e as D,t as h,c as u,w as l,g as I,F as b,r as R,b as k}from"./index-D02r7Zsc.js";import"./classes-BW_GpXTu-AKwVND4h.js";import"./useId-t29UARy6-BH5d2231.js";import"./index-C0p9vHHI-DoOEDIMw.js";import"./useDefaults-DESCdb0p-CFLjYrdG.js";import"./BImg.vue_vue_type_script_setup_true_lang-BJeFN9OT-6jJZkpT2.js";import"./useRadiusElementClasses-DtKYQuWz-DKKObN9q.js";import"./dom-DVb-f0ZG-Crdf0-mU.js";const $={props:{authorId:{type:String,required:!0},recordId:{type:Number,required:!0}},data:function(){return{authorRecords:[],authorDetail:{},processEnded:!1}},methods:{async getAuthorInformations(){if(typeof this.get(`authorDetail${this.authorId}`)=="object"){this.authorRecords=this.spliceAuthorNotice(this.get(`authorDetail${this.authorId}`).authorRecords,this.recordId),this.authorDetail=this.get(`authorDetail${this.authorId}`).authorDetail;return}this.publish("showOverlay",!0),this.authorDetail=await this.get("ws").getAuthorInformations(this.get("sessionId"),this.authorId);let t=this.authorDetail.notice_ids;this.authorRecords=await this.getModule("noticelist").getRecordInformations(this.get("sessionId"),t),this.set(`authorDetail${this.authorId}`,{authorRecords:this.authorRecords,authorDetail:this.authorDetail}),this.authorRecords=this.spliceAuthorNotice(this.authorRecords,this.recordId),this.publish("showOverlay",!1)},spliceAuthorNotice(t,s){let a=Array.from(t);for(let i in a)if(a[i].recordId===s)return a.splice(i,1),a}},created:async function(){await this.getAuthorInformations(),this.processEnded=!0}},A={key:0,class:"mb-2"},v={class:"py-2 h5 title text-center"},w={key:0},N={key:1},C={key:2,class:"text-end"},B={key:0};function E(t,s,a,i,V,j){const n=I("carrouselitem"),d=_,c=f;return t.processEnded?(e(),r("div",A,[y("h2",v,[t.authorDetail.information.author_rejete?(e(),r("span",w,h(t.authorDetail.information.author_rejete),1)):o("",!0),s[0]||(s[0]=D("   ",-1)),t.authorDetail.information.author_name?(e(),r("span",N,h(t.authorDetail.information.author_name),1)):o("",!0),t.authorDetail.information.author_date?(e(),r("div",C,h(t.authorDetail.information.author_date),1)):o("",!0)]),t.authorRecords.length?(e(),r("div",B,[t.authorRecords.length>1?(e(),u(c,{key:0,"label-prev":t.$t("ariaLabels.carouselsControls.left"),"label-next":t.$t("ariaLabels.carouselsControls.right"),ref:"homeCarousel",style:{height:"300px"},class:"pt-2",controls:"",background:"primary"},{default:l(()=>[(e(!0),r(b,null,R(t.authorRecords,(m,p)=>(e(),u(d,{"img-alt":"couverture",key:p},{img:l(()=>[k(n,{detail:!0,record:m},null,8,["record"])]),_:2},1024))),128))]),_:1},8,["label-prev","label-next"])):t.authorRecords.length==1?(e(),u(n,{key:1,detail:!0,record:t.authorRecords[0]},null,8,["record"])):o("",!0)])):o("",!0)])):o("",!0)}const H=g($,[["render",E]]);export{H as default};
