import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";const n={0:`全て`,1:`イベント`,2:`お知らせ`,3:`メンテナンス`},r=e=>{let t=[],n=[],r=[];for(let i in e)t.push(e[i]),n.push(`:--:`),r.push(i);return[t.join(` | `),n.join(` | `),r.join(` | `)].map(e=>`| ${e} |`).join(`
`)},i=async e=>{let{server:t}=e.req.param();switch(t.toUpperCase()){case`JP`:return await a(e);default:throw[]}},a=async r=>{let{type:i=`0`}=r.req.param(),a=await e(`https://api-web.bluearchive.jp/api/news/list`,{query:{typeId:i,pageNum:16,pageIndex:1}});return{title:`ブルアカ - ${n[i]}`,link:`https://bluearchive.jp/news/newsJump`,language:`ja-JP`,image:`https://webcnstatic.yostar.net/ba_cn_web/prod/web/favicon.png`,icon:`https://webcnstatic.yostar.net/ba_cn_web/prod/web/favicon.png`,logo:`https://webcnstatic.yostar.net/ba_cn_web/prod/web/favicon.png`,item:a.data.rows.map(e=>({title:e.summary,description:e.content,link:`https://bluearchive.jp/news/newsJump/${e.id}`,pubDate:t(e.publishTime)}))}},o={path:`/news/:server/:type?`,name:`News`,categories:[`game`],maintainers:[`equt`],example:`/bluearchive/news/jp`,parameters:{server:"game server (ISO 3166 two-letter country code, case-insensitive), only `JP` is supported for now",type:`news type, checkout the table below for details`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},handler:i,description:[n].map(e=>r(e)).join(`

`)};export{o as route};