import { EventJsonDecoder } from './event-json';

export interface GuideForRoomTimerChangedEventJson {
  senderSeq?: number;
  time?: number;
}

export const decodeGuideForRoomTimerChangedEventJson: EventJsonDecoder<
  GuideForRoomTimerChangedEventJson
> = (message: string) => {
  const v = message.split(',');

  return {
    senderSeq: Number(v[0]),
    time: Number(v[1])
  } as GuideForRoomTimerChangedEventJson;
};
