import{E as t}from"./el-link.Rtf9NRWI.js";import{E as e}from"./el-row.-_z_5Gv6.js";import{P as a,c5 as l,d as s,w as i,M as n,c as o,U as r,o as u,e as d,f as c,j as p,F as f,l as m,m as v,i as h,q as g,n as w,t as y}from"./entry.20LI-JPC.js";import{u as x}from"./fetch.Ul_jvjIU.js";import{u as k}from"./useSocket.EMJnTn5p.js";import{u as T}from"./useAdvertisement.QKli2p0j.js";import{u as b}from"./vue.f36acd1f.Gx1kH26G.js";const M={class:"w-full"},j={class:"w-[1180px] mx-auto"},I={key:0,class:"w-full inline-flex py-5 justify-between"},L=["src","alt"],$={key:1,class:"text-[12px] text-[#333] my-2"},O=c("div",{class:"text-[14px] font-bold"},"[友情链接]",-1),S=["alt"],_=["innerHTML"],F={key:0,class:"bg-[#333] py-4"},H=["innerHTML"],U={key:1,class:"bg-[#2a2a2a] py-4"},B={class:"w-[1180px] mx-auto flex items-center justify-center text-[#a1a1a1] text-[13px]"},E=s({__name:"Footer",props:{showTrader:{type:Boolean,default:!0},showLink:{type:Boolean,default:!0},showDefinitions:{type:Boolean,default:!0}},async setup(s){let E,R;const{getSeoInfo:K}=(()=>{const t=a("global-tdk-info",{default:()=>({title:"",keywords:"",description:""})});return{getSeoInfo:async e=>{let{title:a,keywords:s,description:i}=l();if(t.value.description&&t.value.keywords&&t.value.title)return{title:t.value.title,keywords:t.value.keywords,description:t.value.description};const{data:n}=await x(`/api/commonSeoInfo/info/${e}`,"$mHMiyV2Jno");if(n.value&&200===n.value.code){const e=n.value.data.current?n.value.data.current:n.value.data.global;a=e.title,s=e.keywords,i=e.description,t.value.title=e.title,t.value.keywords=e.keywords,t.value.description=e.description}return{title:a,keywords:s,description:i}}}})(),{newThreads:N,newPosts:A,newNotation:P}=k(),{getAllAdvertisementList:D}=T(),{data:q}=([E,R]=i((()=>D({positionKeys:"FORUM-BOTTOM,FORUM-SITE-LINK",status:1}))),E=await E,R(),E),J=n(),{data:V}=([E,R]=i((()=>x("/api/commonSiteSetting/getList","$rfwc5jHxt9"))),E=await E,R(),E),{title:z,keywords:C,description:G}=([E,R]=i((()=>K("global/global"))),E=await E,R(),E),Q=o(),W=o(0),X=r((()=>{clearInterval(Q.value);let t=z;return N.value.length>0||A.value.length>0||P.value.list.length>0?W.value<=20?(W.value%2==0?N.value.length>0?t=`【新主题】 ${z}`:A.value.length>0?t=`【新回复】 ${z}`:P.value.list.length>0&&(t=`【新提醒】 ${z}`):t=`【 】 ${z}`,Q.value=setTimeout((()=>{W.value++}),1e3)):(Q.value=null,t=N.value.length>0?`【新主题】 ${z}`:A.value.length>0?`【新回复】 ${z}`:P.value.list.length>0?`【新提醒】 ${z}`:z):t=z,t}));return J.path.includes("/user/profile")||J.path.includes("/forum/threads/publish")||J.path.includes("/forum/threads/reply")||b({title:X,meta:[{name:"description",content:()=>G},{name:"keywords",content:()=>C}]}),(a,l)=>{const s=t,i=e;return u(),d("div",M,[c("div",j,[p(q)&&a.showTrader?(u(),d("div",I,[(u(!0),d(f,null,m(p(q)["FORUM-BOTTOM"],((t,e)=>(u(),v(s,{href:t.link,target:"_blank",key:"bottom"+e,title:t.title,underline:!1,class:"bg-[#fff]"},{default:h((()=>[c("img",{src:t.content.img.src,style:g({width:""+(t.content.img.width?t.content.img.width+"px":"auto"),height:""+(t.content.img.height?t.content.img.height+"px":"auto")}),alt:t.title},null,12,L)])),_:2},1032,["href","title"])))),128))])):w("",!0),a.showLink?(u(),d("div",$,[O,p(q)["FORUM-SITE-LINK"]?(u(),v(i,{key:0,class:"flex items-center gap-2 flex-wrap pb-[4px]"},{default:h((()=>[(u(!0),d(f,null,m(p(q)["FORUM-SITE-LINK"],((t,e)=>(u(),v(s,{href:t.link,target:"_blank",key:"topImg"+e,title:t.title,underline:!1},{default:h((()=>[c("span",{style:g({color:`${t.content.text.color?t.content.text.color:""}`}),alt:t.title},y(t.content.text.content),13,S)])),_:2},1032,["href","title"])))),128))])),_:1})):w("",!0)])):w("",!0),p(V)?.data&&p(V)?.data.length>0&&a.showDefinitions?(u(),d("div",{key:2,class:"text-[12px] text-[#444] my-2",innerHTML:p(V).data[0].definitions},null,8,_)):w("",!0)]),p(V)?.data&&p(V)?.data.length>0?(u(),d("div",F,[c("div",{class:"w-[1180px] mx-auto text-[#a1a1a1] text-[13px]",innerHTML:p(V).data[0].siteProfile},null,8,H)])):w("",!0),p(V)?.data&&p(V)?.data.length>0?(u(),d("div",U,[c("div",B,y(p(V).data[0].copyright),1)])):w("",!0)])}}});export{E as _};
