import{fS as i,fT as D,fU as $,fV as G,fW as x,fX as E,g as y,A as K,d as A,bp as N,bs as h,bb as P,c as L,r as M,e as k,bR as X,f as j,a3 as H,j as V,o as l,q as _,y as r,m as v,D as F,F as R,s as q,k as c,af as w,ah as U,v as I,w as b,t as B,aj as W,b9 as S,bj as J,bz as Y}from"./index-610a1d46.js";import"./index-74f93929.js";i.Text=D;i.Title=$;i.Paragraph=G;i.Link=x;i.Base=E;i.install=function(t){return t.component(i.name,i),t.component(i.Text.displayName,D),t.component(i.Title.displayName,$),t.component(i.Paragraph.displayName,G),t.component(i.Link.displayName,x),t};var Z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z"}}]},name:"bell",theme:"outlined"};const Q=Z;function z(t){for(var a=1;a[]},pageSize:{type:[Boolean,Number],default:5},currentPage:{type:Number,default:1},titleRows:{type:Number,default:1},descRows:{type:Number,default:2},onTitleClick:{type:Function}},emits:["update:currentPage"],setup(t,{emit:a}){const{prefixCls:n}=L("header-notify-list"),o=M(t.currentPage||1),p=k(()=>{const{pageSize:s,list:m}=t;if(s===!1)return[];let g=X(s)?s:5;return m.slice(g*(j(o)-1),g*j(o))});H(()=>t.currentPage,s=>{o.value=s});const d=k(()=>!!t.onTitleClick),u=k(()=>{const{list:s,pageSize:m}=t;return m>0&&s&&s.length>m?{total:s.length,pageSize:m,current:j(o),onChange(g){o.value=g,a("update:currentPage",g)}}:!1});function f(s){t.onTitleClick&&t.onTitleClick(s)}return{prefixCls:n,getPagination:u,getData:p,handleTitleClick:f,isTitleClickable:d}}});const st={class:"title"},nt={key:0,class:"extra"},ot={key:1},it={key:0,class:"description"},lt={class:"datetime"};function rt(t,a,n,o,p,d){const u=c("a-typography-paragraph"),f=c("a-tag"),s=c("a-avatar"),m=c("a-list-item-meta"),g=c("a-list-item"),C=c("a-list");return l(),_(C,{class:q(t.prefixCls),bordered:"",pagination:t.getPagination},{default:r(()=>[(l(!0),v(R,null,F(t.getData,e=>(l(),_(g,{key:e.id,class:"list-item"},{default:r(()=>[y(m,null,{title:r(()=>[w("div",st,[y(u,{onClick:mt=>t.handleTitleClick(e),style:U([{width:"100%","margin-bottom":"0 !important"},{cursor:t.isTitleClickable?"pointer":""}]),delete:!!e.titleDelete,ellipsis:t.$props.titleRows&&t.$props.titleRows>0?{rows:t.$props.titleRows,tooltip:!!e.title}:!1,content:e.title},null,8,["onClick","style","delete","ellipsis","content"]),e.extra?(l(),v("div",nt,[y(f,{class:"tag",color:e.color},{default:r(()=>[I(b(e.extra),1)]),_:2},1032,["color"])])):B("",!0)])]),avatar:r(()=>[e.avatar?(l(),_(s,{key:0,class:"avatar",src:e.avatar},null,8,["src"])):(l(),v("span",ot,b(e.avatar),1))]),description:r(()=>[w("div",null,[e.description?(l(),v("div",it,[y(u,{style:{width:"100%","margin-bottom":"0 !important"},ellipsis:t.$props.descRows&&t.$props.descRows>0?{rows:t.$props.descRows,tooltip:!!e.description}:!1,content:e.description},null,8,["ellipsis","content"])])):B("",!0),w("div",lt,b(e.datetime),1)])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["class","pagination"])}const ct=V(at,[["render",rt],["__scopeId","data-v-052e7fb7"]]),pt=A({components:{Popover:W,BellOutlined:et,Tabs:S,TabPane:S.TabPane,Badge:J,NoticeList:ct},setup(){const{prefixCls:t}=L("header-notify"),{createMessage:a}=Y(),n=M(T),o=k(()=>{let d=0;for(let u=0;u[y(g,null,{default:r(()=>[(l(!0),v(R,null,F(t.listData,e=>(l(),_(m,{key:e.key},{tab:r(()=>[I(b(e.name)+" ",1),e.list.length!==0?(l(),v("span",dt,"("+b(e.list.length)+")",1)):B("",!0)]),default:r(()=>[e.key==="1"?(l(),_(s,{key:0,list:e.list,onTitleClick:t.onNoticeClick},null,8,["list","onTitleClick"])):(l(),_(s,{key:1,list:e.list},null,8,["list"]))]),_:2},1024))),128))]),_:1})]),default:r(()=>[y(f,{count:t.count,dot:"",numberStyle:t.numberStyle},{default:r(()=>[y(u)]),_:1},8,["count","numberStyle"])]),_:1},8,["overlayClassName"])],2)}const vt=V(pt,[["render",ut]]);export{vt as default};