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

// 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 $models from "./models.js";

export function AddTrust(peerID: string, publicKey: string): $CancellablePromise<void> {
    return $Call.ByID(2986105628, peerID, publicKey);
}

export function GetAutoAccept(): $CancellablePromise<boolean> {
    return $Call.ByID(2605668438);
}

export function GetCloseToSystray(): $CancellablePromise<boolean> {
    return $Call.ByID(3671455511);
}

export function GetHostName(): $CancellablePromise<string> {
    return $Call.ByID(972342140);
}

export function GetID(): $CancellablePromise<string> {
    return $Call.ByID(4240411568);
}

export function GetLanguage(): $CancellablePromise<$models.Language> {
    return $Call.ByID(480133131);
}

export function GetPrivateKey(): $CancellablePromise<string> {
    return $Call.ByID(353744619);
}

export function GetPublicKey(): $CancellablePromise<string> {
    return $Call.ByID(2506498735);
}

export function GetSaveHistory(): $CancellablePromise<boolean> {
    return $Call.ByID(2178923392);
}

export function GetSavePath(): $CancellablePromise<string> {
    return $Call.ByID(4081533263);
}

export function GetTrusted(): $CancellablePromise<{ [_ in string]?: string }> {
    return $Call.ByID(800326956).then(($result: any) => {
        return $$createType0($result);
    });
}

export function GetVersion(): $CancellablePromise<string> {
    return $Call.ByID(3578438023);
}

export function GetWindowState(): $CancellablePromise<$models.WindowState> {
    return $Call.ByID(341414414).then(($result: any) => {
        return $$createType1($result);
    });
}

export function IsTrusted(peerID: string): $CancellablePromise<boolean> {
    return $Call.ByID(1255607538, peerID);
}

export function RemoveTrust(peerID: string): $CancellablePromise<void> {
    return $Call.ByID(732981195, peerID);
}

/**
 * Save 保存配置到磁盘
 */
export function Save(): $CancellablePromise<void> {
    return $Call.ByID(3089450934);
}

export function SetAutoAccept(autoAccept: boolean): $CancellablePromise<void> {
    return $Call.ByID(3371961138, autoAccept);
}

export function SetCloseToSystray(closeToSystray: boolean): $CancellablePromise<void> {
    return $Call.ByID(2558495467, closeToSystray);
}

export function SetHostName(hostName: string): $CancellablePromise<void> {
    return $Call.ByID(1580131496, hostName);
}

export function SetLanguage(language: $models.Language): $CancellablePromise<void> {
    return $Call.ByID(933959199, language);
}

export function SetSaveHistory(saveHistory: boolean): $CancellablePromise<void> {
    return $Call.ByID(3779587628, saveHistory);
}

/**
 * SetSavePath 修改配置
 */
export function SetSavePath(savePath: string): $CancellablePromise<void> {
    return $Call.ByID(3805718491, savePath);
}

export function SetWindowState(state: $models.WindowState): $CancellablePromise<void> {
    return $Call.ByID(4007191514, state);
}

// Private type creation functions
const $$createType0 = $Create.Map($Create.Any, $Create.Any);
const $$createType1 = $models.WindowState.createFrom;
