import{_ as m,d as l,o as r,a as p,c as n,h as f,F as I,r as g,g as a}from"./index-D02r7Zsc.js";const y={props:{items:{type:Array,required:!0},type:{type:String,required:!1,default:""}},data:function(){return{itemList:[],recordIdsArray:[],bulletinIdsArray:[],results:this.items,recordsLoaded:0}},methods:{async getNoticesDetails(){this.publish("showOverlay",!0);for(let t in this.items)this.items[t].recordId!=="0"?this.recordIdsArray.push(parseInt(this.items[t].recordId,10)):this.items[t].bulletinId!=="0"&&this.bulletinIdsArray.push(parseInt(this.items[t].bulletinId));let e=await this.getModule("noticelist").getRecordInformations(this.get("sessionId"),this.recordIdsArray);this.bulletinIdsArray.length&&(await this.get("ws").getBulletinExpl(this.get("sessionId"),this.bulletinIdsArray)).forEach(s=>e.push(s)),this.itemList=this.createItemAndNoticeArray(this.items,e),this.publish("showOverlay",!1)},createItemAndNoticeArray(e,t){let s=[];for(let i in e)for(let o in t)e[i].bulletinId!=="0"?t[o].bulletin_id==e[i].bulletinId&&s.push({item:e[i],record:t[o]}):e[i].recordId!=="0"&&t[o].recordId==e[i].recordId&&s.push({item:e[i],record:t[o]});return s}},created:async function(){await this.getNoticesDetails(),this.getModule("noticelist").scrollToSavedPosition()},watch:{items:async function(){await this.getNoticesDetails()}}},_={class:"overflow-auto"};function b(e,t,s,i,o,v){const d=a("item"),c=a("moveup");return r(),l("div",null,[p("div",_,[(r(!0),l(I,null,g(e.itemList,(u,h)=>(r(),n(d,{key:h,item:u,type:s.type},null,8,["item","type"]))),128))]),e.itemList.length>=5?(r(),n(c,{key:0})):f("",!0)])}const L=m(y,[["render",b]]);export{L as default};
