import { WebviewWindow } from "@tauri-apps/api/webviewWindow"; import { Carousel, CarouselItem } from "@lume/ui"; export function Images({ urls }: { urls: string[] }) { const open = async (url: string) => { const name = new URL(url).pathname .split("/") .pop() .replace(/[^a-zA-Z ]/g, ""); const label = `viewer-${name}`; const window = WebviewWindow.getByLabel(label); if (!window) { const newWindow = new WebviewWindow(label, { url, title: "Image Viewer", width: 800, height: 800, titleBarStyle: "overlay", }); return newWindow; } return await window.setFocus(); }; if (urls.length === 1) { return (