import { createAction } from './actions';

export const CONFIGURE_TABLE = 'CONFIGURE_TABLE';
export const SET_HTML = 'SET_HTML';

export default class TableActions {

  static configureTable(configuration) {
    return createAction(CONFIGURE_TABLE, {
      rowCount: parseInt(configuration.rowCount, 10),
      columnCount: parseInt(configuration.columnCount, 10),
      showHeader: configuration.showHeader,
    });
  }

  static setHtml(html) {
    return createAction(SET_HTML, { html });
  }

}
