import { EnumClass , EnumIO , _from } from '../misc/EnumIO' ; export interface ProcessStageEnum extends EnumIO { methodName : string ; } class ProcessStageClass extends EnumClass implements ProcessStageEnum { readonly methodName : string ; constructor ( { index , str , methodName , } ) { super ( { index , str } ) ; this . methodName = methodName ; } } const Unknown = new ProcessStageClass ( { index : - 1 , str : 'UNKNOWN' , methodName : '$unknown' , } ) ; const Create = new ProcessStageClass ( { index : 0 , str : 'CREATE' , methodName : '$create' , } ) ; const Load = new ProcessStageClass ( { index : 1 , str : 'LOAD' , methodName : '$load' , } ) ; const Mount = new ProcessStageClass ( { index : 2 , str : 'MOUNT' , methodName : '$mount' , } ) ; const Logic = new ProcessStageClass ( { index : 3 , str : 'LOGIC' , methodName : '$logic' , } ) ; const PreRender = new ProcessStageClass ( { index : 4 , str : 'PRE_RENDER' , methodName : '$prerender' , } ) ; const Render = new ProcessStageClass ( { index : 5 , str : 'RENDER' , methodName : '$render' , } ) ; const Unmount = new ProcessStageClass ( { index : 6 , str : 'UNMOUNT' , methodName : '$unmount' , } ) ; const Discard = new ProcessStageClass ( { index : 7 , str : 'DISCARD' , methodName : '$discard' , } ) ; const typeList = [ Unknown , Create , Load , Mount , Logic , PreRender , Render , Unmount , Discard , ] ; function from ( index ) { return _from ( { typeList , index } ) as ProcessStageEnum ; } export const ProcessStage = Object . freeze ( { Unknown , Create , Load , Mount , Logic , PreRender , Render , Unmount , Discard , from , } ) ;