import{t as e}from"./config-BYRrjYC5.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./got-BBDj7u1e.mjs";const r={path:`/news/:lang?`,categories:[`sport`],example:`/atptour/news/en`,parameters:{lang:`en or es.`},radar:[{source:[`atptour.com`]}],name:`News`,maintainers:[`LM1207`],handler:i};async function i(r){let i=`https://www.atptour.com`,a=`${i}/assets/atptour/assets/favicon.ico`,{lang:o=`en`}=r.req.param(),{data:s}=await n(`${i}/${o}/-/tour/news/latest-filtered-results/0/${r.req.query(`limit`)?Number.parseInt(r.req.query(`limit`),10):15}`,{headers:{"user-agent":e.trueUA}});return{title:o===`en`?`News`:`Noticias`,link:`${i}/${o}/news/news-filter-results`,description:o===`en`?`News from the official site of men's professional tennis.`:`Noticias del sitio oficial del tenis profesional masculino.`,language:o,icon:a,logo:a,author:`ATP`,item:s.content.map(e=>({title:e.title,link:i+e.url,description:e.description,author:e.byline,category:e.category,pubDate:t(e.authoredDate),image:i+e.image}))}}export{r as route};