import{d as m,a0 as f,W as p,k as g,o as h,f as u,n,t as d,u as a,q as v,b,X as S,ag as k,bZ as x,_ as I}from"./index-CUMBhq1p.js";const Y={class:"content"},w={class:"txt"},C={class:"form"},D={class:"refresh"},E=m({name:"YiYanContent",__name:"content",setup(T){const e=f(),l=p(),o=async(c=0)=>{var s;if(!(((s=e.yiyan)==null?void 0:s.day)==new Date().getDate()&&c==0)){const t=await x();t.code==0&&(e.yiyan={...t.data,day:new Date().getDate(),bg:Math.floor(Math.random()*22)})}};o();const y=()=>{o(1)};return(c,s)=>{var i,r,_;const t=g("SvgIcon");return h(),u("div",{class:"yiyan-warp",style:S({backgroundImage:`url('${a(k)}/yy_image/${((i=a(e).yiyan)==null?void 0:i.bg)??0}.webp')`,padding:a(l).themeConfig.iconSize*.2+"px"})},[n("div",Y,[n("div",w,d((r=a(e).yiyan)==null?void 0:r.hitokoto),1),n("div",C,[v(" — "+d((_=a(e).yiyan)==null?void 0:_.from)+" ",1),n("span",D,[b(t,{onClick:y,class:"icon",name:"fa fa-refresh",size:"20"})])])])],4)}}}),z=I(E,[["__scopeId","data-v-3c60f58a"]]);export{z as default};
