import{t as e}from"./parse-date-BdYTmLpo.mjs";import{Fragment as t,jsx as n,jsxs as r}from"hono/jsx/jsx-runtime";import{renderToString as i}from"hono/jsx/dom/server";import{raw as a}from"hono/html";const o=(e,o,s,c)=>i(r(t,{children:[e?n(t,{children:a(e)}):null,n(`br`,{}),n(`br`,{}),o?r(t,{children:[n(`img`,{src:o,alt:s,style:`max-width: 100%; height: auto;`}),n(`br`,{}),n(`br`,{})]}):null,c?n(t,{children:a(c)}):null]}));function s(t){let n=t._embedded?.[`wp:featuredmedia`]?.find(e=>e.id===t.featured_media),r=n?.source_url,i=n?.alt_text||n?.title?.rendered||`Featured Image`;return{title:t.title.rendered,description:o(t.excerpt.rendered,r,i,t.content.rendered),link:t.link,pubDate:e(t.date_gmt),updated:e(t.modified_gmt),itunes_item_image:r,image:r,author:t._embedded?.author?.map(e=>({name:e.name,url:e.link,avatar:e.avatar_urls?.[`96`]||e.avatar_urls?.[`48`]||e.avatar_urls?.[`24`]})).join(`, `)||`The Wire Hindi`,category:t._embedded?.[`wp:term`]?.flat().map(e=>e.name)}}export{s as t};