import Func from '@/Engine/ECS/Function';
import SysPage from '@/Frameworks/SysPage';
import { PAGE_KEY } from '@/Project/constants';
export enum FuncPlatformMenuState {
  PlatformMenu,
}

export default class FuncPlatformMenu extends Func<FuncPlatformMenuState> {
  constructor(name: string) {
    super(name);
    super.initStates((sm) => {
      sm.addState(
        FuncPlatformMenuState.PlatformMenu,
        this.onStateIn,
        null,
        this.onStateExit,
      );
    });
  }
  onStateIn(): void {
    SysPage.add(PAGE_KEY.PlatformMenu);
  }
  onStateExit(): void {
    SysPage.removeByKey(PAGE_KEY.PlatformMenu);
  }
}
