import{_ as v}from"./DxB0DKYp.js";import{u as w}from"./BZ7f31ti.js";import{u as y,q as f,o as a,c as r,a as t,t as o,e as s,F as k,r as m,I as p,w as b,d as g,l as q,m as B}from"./BKiFavna.js";const N=["aria-label"],I={class:"container"},L={class:"breaking-inner"},F={class:"breaking-label"},T=["aria-label"],V={key:0,class:"marquee-track"},A={key:1,class:"marquee-track"},C={class:"marquee-item",style:{opacity:".5"}},j={__name:"BreakingNews",setup(D){const{t:x,lang:i}=y(),{api:h}=w(),u=q([]);f(async()=>{try{const e=await h.get("/breaking-news");u.value=e.data?.items||[]}catch{}});const l=B(()=>u.value.map(e=>({text:i.value==="bn"?e.text_bn:e.text_en||e.text_bn,link:e.link||null})));return(e,_)=>{const d=v;return a(),r("section",{id:"section-breaking","aria-label":s(i)==="bn"?"ব্রেকিং নিউজ":"Breaking News"},[t("div",I,[t("div",L,[t("div",F,[_[0]||(_[0]=t("div",{class:"dot"},null,-1)),t("span",null,o(s(x)("breaking.label")),1)]),t("div",{class:"marquee-wrapper",role:"marquee","aria-label":s(i)==="bn"?"ব্রেকিং নিউজ টিকার":"Breaking News Ticker","aria-live":"polite"},[s(l).length?(a(),r("div",V,[(a(!0),r(k,null,m(s(l),(n,c)=>(a(),p(d,{key:c,to:n.link||"/breaking",class:"marquee-item","aria-label":n.text},{default:b(()=>[g(o(n.text),1)]),_:2},1032,["to","aria-label"]))),128)),(a(!0),r(k,null,m(s(l),(n,c)=>(a(),p(d,{key:"dup-"+c,to:n.link||"/breaking",class:"marquee-item","aria-hidden":"true"},{default:b(()=>[g(o(n.text),1)]),_:2},1032,["to"]))),128))])):(a(),r("div",A,[t("span",C,o(s(i)==="bn"?"লোড হচ্ছে...":"Loading..."),1)]))],8,T)])])],8,N)}}};export{j as _};
