var TALK = [
  {type: "normal", talk: [[0, "ねむい(´・ω・`)"]]},
  {type: "normal", talk: [[0, "にゃー"]]},
  {type: "normal", talk: [[0, "わん"]]},
  {type: "normal", talk: [[0, "ゴロゴロ"]]},
  {type: "normal", talk: [[0, "うんちでた"]]},
  {type: "normal", talk: [[0, "%username%、飲みいこ？"]]},
  {type: "normal", talk: [[0, "おそら きれい"]]},
  {type: "normal", talk: [[0, "おなかすいた"]]},
  {type: "normal", talk: [[0, "Zzz . . .", "sleep"]]},
  {type: "normal", talk: [[0, "ねこちゃんです"]]},
  {type: "normal", talk: [[0, "♪"]]},
  {type: "normal", talk: [[0, "おふとんいく"], [500, "Zzz . . .", "sleep"]]},
  // {type: "normal", talk: [[0, "おはよー"]]},
  {type: "normal", talk: [[0, "りんご"],
                          [300, "ごりら"],
                          [300, "らっぱ"],
                          [400, "ぱいなっぷる"],
                          [500, "…"],
                          [3000, "るーびっくきゅーぶ"],
                          [400, "……"],
                          [1000, "ぶたどん！"],
                          [600, "(´・ω・`)", "sleep"]]},
  {type: "normal", talk: [[0, "九九言えるよ！"],
                          [200, "しち いち が しち"],
                          [200, "しち に じゅうし"],
                          [200, "しち さん にじゅういち"],
                          [200, "しち し にじゅうはち"],
                          [200, "しち ご さんじゅうご"],
                          [200, "しち ろく しじゅうに"],
                          [200, "しち しち"],
                          [500, "…"],
                          [3000, "しち しち"],
                          [400, "……"],
                          [1000, "しち は ごじゅうろく"],
                          [200, "しち く ろくじゅうさん！"]]},
  {type: "normal", talk: [[0, "実は俺、Electronでできてるんだぜ…", "alt"]]},
  {type: "normal", talk: [[0, "名張って虫多くね？"]]},
  {type: "normal", talk: [[0, "よていはみてい"]]},
  {type: "normal", talk: [[0, "そう、物理的には、ね"]]},
  {type: "normal", talk: [[0, "地震"], [300, "かみなり", "reverse"], [300, "火事"], [300, '留年(´・ω・`)', "reverse"]]},
];

var GREET = [
  {type: "normal", talk: [[0, "おはようございました"]]},
  {type: "normal", talk: [[0, "%username%、おはよー"]]},
  {type: "normal", talk: [[0, "とりあえずビールで"]]},
];


var TIMETALK = function(timestr) {
  // 5分間隔でしかキャッチできないぞ
  switch (timestr) {
  case "09:00":
    return {type: "normal", talk: [[0, "%username%、9時だよ！"]]};
  case "10:00":
    return {type: "normal", talk: [[0, "%username%、10時だよ！"]]};
  case "11:00":
    return {type: "normal", talk: [[0, "%username%、11時だよ！"]]};
  case "12:00":
    return {type: "normal", talk: [[0, "%username%、お昼だよ！ごはん！"]]};
  case "13:00":
    return {type: "normal", talk: [[0, "%username%、13時だよ！"]]};
  case "14:00":
    return {type: "normal", talk: [[0, "%username%、14時だよ！"]]};
  case "15:00":
    return {type: "normal", talk: [[0, "おやつの時間になりました"]]};
  case "16:00":
    return {type: "normal", talk: [[0, "%username%、16時だよ！"]]};
  case "17:00":
    return {type: "normal", talk: [[0, "%username%、17時だよ！"]]};
  case "18:00":
    return {type: "normal", talk: [[0, "%username%、18時だよ！"]]};
  case "19:00":
    return {type: "normal", talk: [[0, "%username%、19時だよ！"]]};
  case "20:00":
    return {type: "normal", talk: [[0, "%username%、20時だよ！"]]};
  case "21:00":
    return {type: "normal", talk: [[0, "%username%、21時だよ！"]]};
  case "22:00":
    return {type: "normal", talk: [[0, "%username%、22時だよ！"]]};
  case "23:00":
    return {type: "normal", talk: [[0, "%username%、もう11時だよ！<br>そろそろ寝たほうが良いよ！"]]};
  }
  return false;
};

var TTEIJI = {type: "normal", talk: [
  [0, "%username%、定時だよ！"],
  [100, "%username%、定時だよ！", "reverse"],
  [100, "%username%、定時だよ！"],
  [100, "%username%、定時だよ！", "reverse"],
  [100, "%username%、残業せずに帰ろう！！"],
  [100, "%username%、残業せずに帰ろう！！", "reverse"],
  [100, "%username%、残業せずに帰ろう！！"],
  [100, "%username%、残業せずに帰ろう！！", "reverse"]
]};

var GINPUT = function(str) {
  switch (true) {
  case /^おはよ.*/.test(str):
    return "%username%、おはよー";
  case /^(時間|じかん|時刻|じこく|time)$/.test(str):
    var d = new Date();
    return "今は" + d.getHours() + "時" + d.getMinutes() + "分だよ！" ;
  }
  return false;
};

module.exports = {TALK, GREET, GINPUT, TIMETALK, TTEIJI};

