import "@johnlindquist/kit";
const history = await getClipboardHistory();
let { value, type } = await arg("What to paste?", () => {
return history.map(({ value, type, timestamp, maybeSecret }) => {
const multilinePreview = value.includes("\n")
? `<div class="font-mono text-xs">${value
.split("\n")
.map((line) => `<p>${line}</p>`)
.join("")}<div>`
: null;
const preview = type === "image" ? `<img src="${value}" alt="${value}">` : multilinePreview;