import{b as _,a as l,h as t,t as s,i as p,j as d,F as f,G as v,u as h,E as k,T as y,H as m,I,J as B}from"./vue-y3KLWBaS.js";import{M as q}from"./MkMarquee-aUfIJ8Oe.js";import{Q as S,n as b}from"./app-JmgyQoR0.js";import{s as g}from"./shuffle-SQ0_zvAE.js";const x=a=>(I("data-v-c5d21028"),a=a(),B(),a),M={key:0,class:"xbhtxfms"},w={class:"item"},C=["href","title"],D=x(()=>h("span",{class:"divider"},null,-1)),R=_({__name:"statusbar-rss",props:{url:{},shuffle:{type:Boolean},display:{},marqueeDuration:{},marqueeReverse:{type:Boolean},oneByOneInterval:{},refreshIntervalSec:{}},setup(a){const r=a,u=l([]),i=l(!0);let c=l(0);return S(()=>{fetch(`/api/fetch-rss?url=${r.url}`,{}).then(e=>{e.json().then(o=>{r.shuffle&&g(o.items),u.value=o.items,i.value=!1,c.value++})})},Math.max(5e3,r.refreshIntervalSec*1e3),{immediate:!0,afterMounted:!0}),(e,o)=>i.value?m("",!0):(t(),s("span",M,[e.display==="marquee"?(t(),p(y,{key:0,name:"change",mode:"default"},{default:d(()=>[(t(),p(q,{key:c.value,duration:e.marqueeDuration,reverse:e.marqueeReverse},{default:d(()=>[(t(!0),s(f,null,v(u.value,n=>(t(),s("span",w,[h("a",{class:"link",href:n.link,rel:"nofollow noopener",target:"_blank",title:n.title},k(n.title),9,C),D]))),256))]),_:1},8,["duration","reverse"]))]),_:1})):e.display==="oneByOne"?(t(),s(f,{key:1},[],64)):m("",!0)]))}}),O=b(R,[["__scopeId","data-v-c5d21028"]]);export{O as default};
