import { invoke } from '@tauri-apps/api/core' export interface DownloadOptions { serverUrl: string } export interface DownloadResponse { success: boolean bundleName: string serverUrl: string version: string } export interface WindowOptions { title?: string width?: number height?: number resizable?: boolean } export interface LoadOptions { bundleName: string inline?: boolean window?: WindowOptions } export interface LoadResponse { success: boolean windowLabel: string } export interface CloseOptions { windowLabel: string } export interface CloseResponse { success: boolean } export interface RemoveOptions { bundleName: string serverUrl: string } export interface RemoveResponse { success: boolean bundleName: string } export async function download(options: DownloadOptions): Promise { return await invoke('plugin:appload|download', { options }) } export async function load(options: LoadOptions): Promise { return await invoke('plugin:appload|load', { options }) } export async function close(options: CloseOptions): Promise { return await invoke('plugin:appload|close', { options }) } export async function remove(options: RemoveOptions): Promise { return await invoke('plugin:appload|remove', { options }) } export async function clear(): Promise { return await invoke('plugin:appload|clear') }