import { EnumClass , EnumIO , _from , _fromString } from '../misc/EnumIO' ; export type VisibilityEnum = EnumIO ; class VisibilityClass extends EnumClass implements VisibilityEnum { constructor ( { index , str } ) { super ( { index , str } ) ; } } const Neutral = new VisibilityClass ( { index : 0 , str : 'Neutral' } ) ; const Visible = new VisibilityClass ( { index : 1 , str : 'Visible' } ) ; const Invisible = new VisibilityClass ( { index : - 1 , str : 'Invisible' , } ) ; const typeList = [ Visible , Invisible , Neutral ] ; function from ( index ) { return _from ( { typeList , index } ) as VisibilityEnum ; } function fromString ( str ) { return _fromString ( { typeList , str } ) as VisibilityEnum ; } export const Visibility = Object . freeze ( { Visible , Invisible , Neutral , from , fromString , } ) ;