import type { Service } from '../types';

/** Minimal network placeholder used when transport is disabled. */
export default class NullNetwork implements Service
{
    public name = 'NullNetwork';
    public readonly serviceType = 'network';
    protected _token = '';
    protected _serverUrl = '';

    public get baseAssetsUrl(): string
    {
        return '';
    }

    public get baseImgsUrl(): string
    {
        return '';
    }

    public get baseUrl(): string
    {
        return '';
    }

    public get pathInit(): string
    {
        return '';
    }

    public get pathBet(): string
    {
        return '';
    }

    public createRequestInit(data: unknown): RequestInit
    {
        return {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json',
            },
            body: JSON.stringify(data ?? {}),
        };
    }

    public async createRequest(_url: string, _requestInit: RequestInit): Promise<unknown>
    {
        return {};
    }

    public async init(): Promise<unknown>
    {
        return {};
    }

    public async heartBeat(): Promise<unknown>
    {
        return {};
    }

    public async bet(_betAmount?: number, _bonus?: boolean): Promise<unknown>
    {
        return {};
    }

    public async freespin(): Promise<unknown>
    {
        return {};
    }

    public async respin(): Promise<unknown>
    {
        return {};
    }

    public async buyFreespins(_bet?: number): Promise<unknown>
    {
        return {};
    }

    public async buyBonus(_bet?: number): Promise<unknown>
    {
        return {};
    }

    public async wildSpin(_bet?: number): Promise<unknown>
    {
        return {};
    }

    public dispose(): void
    {
        // Nothing to release.
    }
}
