import {execute} from '../support/commander';
import {SET_ROOM, SET_ROOM_LOADING, SET_ROOM_NOT_READY, SET_ROOM_READY} from './constants';

export function setRoom(roomId, name) {
    return {
        type: SET_ROOM,
        payload: {roomId, name}
    }
}

export function setRoomLoading() {
    return {
        type: SET_ROOM_LOADING
    }
}

export function setRoomNotReady() {
    return {
        type: SET_ROOM_NOT_READY
    }
}

export function setRoomReady(username) {
    return {
        type: SET_ROOM_READY,
        payload: {username}
    }
}
