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

/**
 * MiningBridge wraps the Mining service for integration with lthn-desktop.
 * It implements module.GinModule to register routes with the module registry.
 * @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 module$0 from "../github.com/Snider/Core/pkg/module/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as mining$0 from "../github.com/Snider/Mining/pkg/mining/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as gin$0 from "../github.com/gin-gonic/gin/models.js";

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

/**
 * GetAvailableMiners returns available miner types with their installation status.
 */
export function GetAvailableMiners(): $CancellablePromise<$models.AvailableMiner[]> {
    return $Call.ByID(1684715444).then(($result: any) => {
        return $$createType1($result);
    });
}

/**
 * GetHashrateHistory returns hashrate history for a miner.
 */
export function GetHashrateHistory(name: string): $CancellablePromise<mining$0.HashratePoint[]> {
    return $Call.ByID(2225670265, name).then(($result: any) => {
        return $$createType3($result);
    });
}

/**
 * GetManager returns the mining manager for direct access.
 */
export function GetManager(): $CancellablePromise<mining$0.Manager | null> {
    return $Call.ByID(1181057080).then(($result: any) => {
        return $$createType5($result);
    });
}

/**
 * GetMinerStats returns stats for a specific miner.
 */
export function GetMinerStats(name: string): $CancellablePromise<$models.MinerStats | null> {
    return $Call.ByID(4276052451, name).then(($result: any) => {
        return $$createType7($result);
    });
}

/**
 * InstallMiner installs a miner by type.
 */
export function InstallMiner(minerType: string): $CancellablePromise<void> {
    return $Call.ByID(3804132133, minerType);
}

/**
 * ListMiners returns a list of running miners.
 */
export function ListMiners(): $CancellablePromise<$models.MinerInfo[]> {
    return $Call.ByID(3810820203).then(($result: any) => {
        return $$createType9($result);
    });
}

/**
 * ModuleConfig returns the module configuration for registration.
 */
export function ModuleConfig(): $CancellablePromise<module$0.Config> {
    return $Call.ByID(3066014105).then(($result: any) => {
        return $$createType10($result);
    });
}

/**
 * RegisterRoutes implements module.GinModule to register mining API routes.
 */
export function RegisterRoutes(group: gin$0.RouterGroup | null): $CancellablePromise<void> {
    return $Call.ByID(2353404544, group);
}

/**
 * StartMiner starts a miner with the given configuration.
 */
export function StartMiner(minerType: string, pool: string, wallet: string): $CancellablePromise<void> {
    return $Call.ByID(4178811420, minerType, pool, wallet);
}

/**
 * StopMiner stops a running miner.
 */
export function StopMiner(name: string): $CancellablePromise<void> {
    return $Call.ByID(2305106234, name);
}

/**
 * UninstallMiner uninstalls a miner by type.
 */
export function UninstallMiner(minerType: string): $CancellablePromise<void> {
    return $Call.ByID(2255064918, minerType);
}

// Private type creation functions
const $$createType0 = $models.AvailableMiner.createFrom;
const $$createType1 = $Create.Array($$createType0);
const $$createType2 = mining$0.HashratePoint.createFrom;
const $$createType3 = $Create.Array($$createType2);
const $$createType4 = mining$0.Manager.createFrom;
const $$createType5 = $Create.Nullable($$createType4);
const $$createType6 = $models.MinerStats.createFrom;
const $$createType7 = $Create.Nullable($$createType6);
const $$createType8 = $models.MinerInfo.createFrom;
const $$createType9 = $Create.Array($$createType8);
const $$createType10 = module$0.Config.createFrom;
