import { ViewAction } from 'plume2' ; import { Command } from './command' ; export class TodoAction extends ViewAction { changeText = ( text ) => { this . store . dispatch ( Command . CHANGE_TEXT , text ) ; } ; submitText = ( text ) => { this . store . dispatch ( Command . SUMBIT_TEXT , text ) ; } ; toggleAll = ( checked ) => { this . store . dispatch ( Command . TOGGLE_ALL , checked ) ; } ; toggle = ( index ) => { this . store . dispatch ( Command . TOGGLE , index ) ; } ; changeFilter = ( filter ) => { this . store . dispatch ( Command . CHANGE_FILTER , filter ) ; } ; destroy = ( index ) => { this . store . dispatch ( Command . DESTROY , index ) ; } ; cleanCompleted = ( ) => { this . store . dispatch ( Command . CLEAN_COMPLETED ) ; } ; }