export class Style implements Module { getModule ( ) { return { state : { style : { timeout : false , isEditing : false , slidein : false , slideout : false , fadein : false , fadeout : false , show : false , qrfadein : false , qrfadeout : false , notificationFadein : false , notificationFadeout : false , hotpDisabled : false , } , } , mutations : { showMenu ( state ) { state . style . slidein = true ; state . style . slideout = false ; } , hideMenu ( state ) { state . style . slidein = false ; state . style . slideout = true ; setTimeout ( ( ) => { state . style . slideout = false ; } , 200 ) ; } , showInfo ( state , noAnimate ? ) { if ( noAnimate ) { state . style . show = true ; } else { state . style . fadein = true ; state . style . fadeout = false ; } } , hideInfo ( state , noAnimate ? ) { if ( noAnimate ) { state . style . show = false ; } else { state . style . fadein = false ; state . style . fadeout = true ; } setTimeout ( ( ) => { state . style . fadeout = false ; } , 200 ) ; } , showQr ( state ) { state . style . qrfadein = true ; state . style . qrfadeout = false ; } , hideQr ( state ) { state . style . qrfadein = false ; state . style . qrfadeout = true ; setTimeout ( ( ) => { state . style . qrfadeout = false ; } , 200 ) ; } , showNotification ( state ) { state . style . notificationFadein = true ; state . style . notificationFadeout = false ; setTimeout ( ( ) => { state . style . notificationFadein = false ; state . style . notificationFadeout = true ; setTimeout ( ( ) => { state . style . notificationFadeout = false ; } , 200 ) ; } , 1000 ) ; } , toggleEdit ( state ) { state . style . isEditing = ! state . style . isEditing ; } , toggleHotpDisabled ( state ) { state . style . hotpDisabled = ! state . style . hotpDisabled ; } , } , getters : { isMenuShown ( state ) { return state . style . fadein || state . style . show || state . style . slidein ; } , } , namespaced : true , } ; } }