import Func from '@/Engine/ECS/Function';
import SysPage from '@/Frameworks/SysPage';
import { PAGE_KEY } from '@/Project/constants';

export enum FuncProjectDetailState {
  Idle,
}
export default class FuncProjectDetail extends Func<FuncProjectDetailState> {
  constructor(name: string) {
    super(name);
    super.initStates((sm) => {
      sm.addState(FuncProjectDetailState.Idle, this.onIdleStateIn, null, this.onIdleStateExit);
    });
  }
  onIdleStateIn(): void {
    SysPage.add(PAGE_KEY.ProjectDetail);
  }
  onIdleStateExit(): void {
    SysPage.removeByKey(PAGE_KEY.ProjectDetail);
  }
}