import "@johnlindquist/kit"
let anime = await arg("Anime:")
let response = await get(
`https://api.jikan.moe/v4/anime?q=${anime}`
)
let { images, title } = response.data.data[0]
let { jpg } = images
let { image_url, small_image_url, large_image_url } = jpg
const html = `<a :href="url">
<img :src="url" />
<div class="card__name">
<span>${title}</span>
</div>
</a>`;
let wg = await widget(html, {
state: {
url: large_image_url
}
})
wg.onResized(async () => {
wg.fit()
})