import { _decorator, ccenum } from 'cc';

export interface IEventHandler
{
    // evtType: EventsType;

    fn_Execute(evtType: EventsType): void;
}

export interface IExitHandler extends IEventHandler
{
    fn_Execute(evtType: EventsType): void; // OnReturnToMenu

    fn_OnReturnToMenu(): void;
}

export interface IShowCardsHandler extends IEventHandler
{
    fn_Execute(evtType: EventsType): void; // OnReturnToMenu

    fn_ArchiveCards(): void;
    fn_OnHintRequest(): void;
}

export interface IRestartHandler extends IEventHandler
{
    fn_Execute(evtType: EventsType): void;

    fn_OnRestartGameRequest();
}

export interface IEventsData
{
    fn_PassEventData(evtArgs: EventArgs);
}

export enum EventsType
{
    RETURN_TO_MENU = 0,
    ARCHIVE_CARDS = 1,
    RESTART = 2,
    HINT_BAR = 3,

    MAX_ENUM = 4
}
ccenum(EventsType);

export enum EventOperations
{
    ATTACH = 0,
    DETACH = 1, //
    FIRE = 2,

    MAX_ENUM = 3
}
ccenum(EventsType);

export class EventArgs
{
    evtType: EventsType;
    evtOp: EventOperations;
}