import{t as e}from"./got-BBDj7u1e.mjs";import{i as t,t as n}from"./utils-My-yIG92.mjs";const r={tv:`TV Shows`,movie:`Movies`},i={path:`/trending/:mediaType/:timeWindow/:lang?`,categories:[`multimedia`],example:`/themoviedb/trending/tv/day/en-US`,parameters:{mediaType:"`movie` or `tv`",timeWindow:"`day` or `week`",lang:`Language`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`Trending`,maintainers:[`x2cf`],handler:a};async function a(i){let{mediaType:a,timeWindow:o,lang:s}=i.req.param(),{data:c}=await e(`https://api.themoviedb.org/3/trending/${a}/${o}`,{searchParams:{language:s,api_key:t()}});return{title:`Popular ${r[a]} — TMDB`,link:`https://www.themoviedb.org/${a}`,item:c.results.map(e=>n[a](e,s))}}export{i as route};