import BusinessTypeSetting, { BusinessEnum } from "../../Base/BusinessTypeSetting";
import { NetRequest } from "../../Engine/CatanEngine/NetManagerV2/NetRequest";

//=======================================================================================
// /**取得歷史紀錄網頁網址協定 */
// export class HistoryRequest extends NetRequest<any, JSON> {
//     get Method(): string {
//         return "history.url";
//     }

//     constructor(slotId: number) {
//         super();
//         this.Data = {
//             slot: slotId,
//             lang: LanguageManager.UseLanguageUrlStr,
//         };
//     }
// }
//=======================================================================================
export class SlotInRequest extends NetRequest<any, JSON> {
    get Method(): string {
        return "slot.in";
    }
    constructor(slotid: number, hall: number = 0, uid: number = 0) {
        super();
        switch (BusinessTypeSetting.TYPE_BUSINESS) {
            case BusinessEnum.BusinessType.Type1:
                this.Data = {
                    id: slotid
                }
                break;
            case BusinessEnum.BusinessType.Type2:
                this.Data = {
                    id: slotid,
                    hall: hall,
                    uid: uid,
                };
                break;
            default:
                console.error("No TYPE_BUSINESS");
                break;
        }
    }
}
//=======================================================================================
export class SlotOutRequest extends NetRequest<null, null> {
    get Method(): string {
        return "slot.out";
    }
}
//=======================================================================================
export class FishOutRequest extends NetRequest<null, null> {
    get Method(): string {
        return "fish.out";
    }
}
//=======================================================================================
export class TableOutRequest extends NetRequest<null, null> {
    get Method(): string {
        return "table.out";
    }
}
//=======================================================================================
export class PinBallOutRequest extends NetRequest<null, null> {
    get Method(): string {
        return "pinball.out";
    }
}
//=======================================================================================
