// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

/**
 * App 应用结构体
 * @module
 */

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as application$0 from "../github.com/wailsapp/wails/v3/pkg/application/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as filesystem$0 from "./internal/filesystem/models.js";

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as $models from "./models.js";

/**
 * CheckUpdate 检查更新
 */
export function CheckUpdate(): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(586574094).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * ClearCache 清理本地缓存（用于菜单项）
 */
export function ClearCache(): $CancellablePromise<void> {
    return $Call.ByID(1413834504);
}

/**
 * CreateDir 创建目录
 */
export function CreateDir(path: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
    return $Call.ByID(632035444, path).then(($result: any) => {
        return $$createType2($result);
    });
}

/**
 * CreateFile 创建文件
 */
export function CreateFile(path: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
    return $Call.ByID(3418645411, path).then(($result: any) => {
        return $$createType2($result);
    });
}

/**
 * DeletePath 删除文件或目录
 */
export function DeletePath(path: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
    return $Call.ByID(1564637217, path).then(($result: any) => {
        return $$createType2($result);
    });
}

/**
 * DeletePermanently 永久删除回收站中的文件
 */
export function DeletePermanently(recyclePath: string): $CancellablePromise<void> {
    return $Call.ByID(1697000327, recyclePath);
}

/**
 * DetectFileTypeByContent 通过文件内容检测文件类型
 */
export function DetectFileTypeByContent(path: string): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(3067282982, path).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * DownloadUpdate 下载更新包
 */
export function DownloadUpdate(downloadURL: string): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(115027584, downloadURL).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * EmptyRecycleBin 清空回收站
 */
export function EmptyRecycleBin(): $CancellablePromise<void> {
    return $Call.ByID(4176312624);
}

/**
 * ExportPDF 导出PDF文件
 */
export function ExportPDF(content: string, title: string, fileName: string, fontSize: number, pageWidth: number, pageHeight: number): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(1770450987, content, title, fileName, fontSize, pageWidth, pageHeight).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * ExtractFileFromZip 从 zip 文件中提取单个文件内容
 */
export function ExtractFileFromZip(zipPath: string, filePath: string): $CancellablePromise<string> {
    return $Call.ByID(1578144127, zipPath, filePath);
}

/**
 * ExtractFileFromZipToTemp 从 zip 文件中提取单个文件到临时目录
 */
export function ExtractFileFromZipToTemp(zipPath: string, filePath: string): $CancellablePromise<string> {
    return $Call.ByID(1720007904, zipPath, filePath);
}

/**
 * GetAppConfig 获取应用配置
 */
export function GetAppConfig(): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(2006534548).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * GetAuditLogs 获取审计日志
 */
export function GetAuditLogs(limit: number): $CancellablePromise<{ [_ in string]?: any }[]> {
    return $Call.ByID(3554903517, limit).then(($result: any) => {
        return $$createType3($result);
    });
}

/**
 * GetCPUInfo 获取 CPU 信息
 */
export function GetCPUInfo(): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(2509681007).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * GetCommonPaths 获取常用系统路径
 */
export function GetCommonPaths(): $CancellablePromise<{ [_ in string]?: string }> {
    return $Call.ByID(3953343786).then(($result: any) => {
        return $$createType4($result);
    });
}

/**
 * GetCurrentVersion 获取当前版本号
 */
export function GetCurrentVersion(): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(1827245900).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * GetDiskInfo 获取磁盘信息
 */
export function GetDiskInfo(): $CancellablePromise<{ [_ in string]?: any }[]> {
    return $Call.ByID(3756377758).then(($result: any) => {
        return $$createType3($result);
    });
}

/**
 * GetEnvVars 获取环境变量
 */
export function GetEnvVars(): $CancellablePromise<{ [_ in string]?: string }> {
    return $Call.ByID(363814436).then(($result: any) => {
        return $$createType4($result);
    });
}

/**
 * GetFileInfo 获取文件信息
 */
export function GetFileInfo(path: string): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(2071650585, path).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * GetFileServerURL 获取本地文件服务器的URL
 */
export function GetFileServerURL(): $CancellablePromise<string> {
    return $Call.ByID(4117667287);
}

/**
 * GetMemoryInfo 获取内存信息
 */
export function GetMemoryInfo(): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(2096905876).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * GetRecycleBinEntries 获取回收站条目
 */
export function GetRecycleBinEntries(): $CancellablePromise<{ [_ in string]?: any }[]> {
    return $Call.ByID(2312855399).then(($result: any) => {
        return $$createType3($result);
    });
}

/**
 * GetSystemInfo 获取系统信息
 */
export function GetSystemInfo(): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(1347250254).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * GetUpdateConfig 获取更新配置
 */
export function GetUpdateConfig(): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(680804904).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * GetZipFileInfo 获取 zip 文件中特定文件的信息
 */
export function GetZipFileInfo(zipPath: string, filePath: string): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(2031617692, zipPath, filePath).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * InstallUpdate 安装更新包
 */
export function InstallUpdate(installerPath: string, autoRestart: boolean): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(2443992793, installerPath, autoRestart).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * InstallUpdateWithHash 安装更新包（带哈希验证）
 */
export function InstallUpdateWithHash(installerPath: string, autoRestart: boolean, expectedHash: string, hashType: string): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(3787276601, installerPath, autoRestart, expectedHash, hashType).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * ListDir 列出目录
 */
export function ListDir(path: string): $CancellablePromise<{ [_ in string]?: any }[]> {
    return $Call.ByID(2120475736, path).then(($result: any) => {
        return $$createType3($result);
    });
}

/**
 * ListZipContents 列出 zip 文件内容
 */
export function ListZipContents(zipPath: string): $CancellablePromise<{ [_ in string]?: any }[]> {
    return $Call.ByID(3013109042, zipPath).then(($result: any) => {
        return $$createType3($result);
    });
}

/**
 * OpenPath 使用系统默认程序打开文件或目录
 */
export function OpenPath(path: string): $CancellablePromise<void> {
    return $Call.ByID(1591734570, path);
}

/**
 * ReadFile 读取文件
 */
export function ReadFile(path: string): $CancellablePromise<string> {
    return $Call.ByID(1160596971, path);
}

/**
 * Reload 重新加载窗口（用于菜单项）
 */
export function Reload(): $CancellablePromise<void> {
    return $Call.ByID(2733532980);
}

/**
 * RenamePath 重命名文件或目录
 */
export function RenamePath(req: $models.RenamePathRequest): $CancellablePromise<filesystem$0.FileOperationResult | null> {
    return $Call.ByID(1959759948, req).then(($result: any) => {
        return $$createType2($result);
    });
}

/**
 * ResolveShortcut 解析快捷方式文件，返回目标路径信息
 */
export function ResolveShortcut(lnkPath: string): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(4051288361, lnkPath).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * RestoreFromRecycleBin 从回收站恢复文件
 */
export function RestoreFromRecycleBin(recyclePath: string): $CancellablePromise<void> {
    return $Call.ByID(3682437655, recyclePath);
}

/**
 * SaveAppConfig 保存应用配置
 */
export function SaveAppConfig(req: $models.SaveAppConfigRequest): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(1942219977, req).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * SaveBase64File 将 base64 内容解码后写入文件（用于图片等二进制数据）
 */
export function SaveBase64File(req: $models.SaveBase64FileRequest): $CancellablePromise<void> {
    return $Call.ByID(1355120553, req);
}

/**
 * SelectPDFSaveDirectory 选择PDF保存目录
 */
export function SelectPDFSaveDirectory(): $CancellablePromise<string> {
    return $Call.ByID(1403263131);
}

/**
 * SetMainWindow 设置主窗口引用（由 main.go 在创建窗口后调用）
 */
export function SetMainWindow(w: application$0.WebviewWindow | null): $CancellablePromise<void> {
    return $Call.ByID(843697430, w);
}

/**
 * SetUpdateConfig 设置更新配置
 */
export function SetUpdateConfig(autoCheckEnabled: boolean, checkIntervalMinutes: number, checkURL: string): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(4271731092, autoCheckEnabled, checkIntervalMinutes, checkURL).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * SetWindowTitleBarColor 设置原生标题栏颜色 + 主题模式（0x00BBGGRR 格式）
 */
export function SetWindowTitleBarColor(color: number, isDark: boolean): $CancellablePromise<void> {
    return $Call.ByID(1570627619, color, isDark);
}

/**
 * VerifyUpdateFile 验证更新文件哈希值
 */
export function VerifyUpdateFile(filePath: string, expectedHash: string, hashType: string): $CancellablePromise<{ [_ in string]?: any }> {
    return $Call.ByID(2181909867, filePath, expectedHash, hashType).then(($result: any) => {
        return $$createType0($result);
    });
}

/**
 * WindowClose 关闭窗口
 */
export function WindowClose(): $CancellablePromise<void> {
    return $Call.ByID(1474073651);
}

/**
 * WindowIsMaximized 检查窗口是否最大化
 */
export function WindowIsMaximized(): $CancellablePromise<boolean> {
    return $Call.ByID(854232017);
}

/**
 * WindowMaximize 最大化/还原窗口
 */
export function WindowMaximize(): $CancellablePromise<void> {
    return $Call.ByID(2739663967);
}

/**
 * WindowMinimize 最小化窗口
 */
export function WindowMinimize(): $CancellablePromise<void> {
    return $Call.ByID(1846147565);
}

/**
 * WindowToggleAlwaysOnTop 切换窗口置顶
 */
export function WindowToggleAlwaysOnTop(): $CancellablePromise<boolean> {
    return $Call.ByID(3391208916);
}

/**
 * WriteFile 写入文件
 */
export function WriteFile(req: $models.WriteFileRequest): $CancellablePromise<void> {
    return $Call.ByID(3562730546, req);
}

// Private type creation functions
const $$createType0 = $Create.Map($Create.Any, $Create.Any);
const $$createType1 = filesystem$0.FileOperationResult.createFrom;
const $$createType2 = $Create.Nullable($$createType1);
const $$createType3 = $Create.Array($$createType0);
const $$createType4 = $Create.Map($Create.Any, $Create.Any);
