text: const ArgumentType = require('../../extension-support/argument-type');
  const BlockType = require('../../extension-support/block-type');
  const log = require('../../util/log');
  const formatMessage = require('format-message')
  const EXTB_LIST = require('../../util/extb-definitions');
  const miscMenuBlocks = require('../../myBlocks/menu');
  const carBlocks = require('../../myBlocks/car');
  const cameraBlocks = require('../../myBlocks/camerab');
  const sensorBlocks = require('../../myBlocks/sensor');
  const actionBlocks = require('../../myBlocks/action');
  const { extb_udpi_mini } = require ('../../../src/util/extb-definitions');
  
  // 方块图标链接
  const blockIconURI = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAEVtJREFUaEPtWQlUVFea/mpfqY0dChBlXxSiICAdtzZuaEwI7h3Hafsk0Y7picHpzmg6W0862sa0nWi67bglajY10Rgn7oZNFFFQUAHZhALZiwKK2vu/L0LE4AQnOcfTZ/odrla9e+u+//vX77+Ph3/yi/dPLj/+BeBBW/D/jwUMBoOcLolareaU3tnZyVOpVKirgzkggGe+X0u4XC5BV1eXu1KpZEq8U5Eu+t7O4/GsQ9lzyBbo7u59huRPcjqdfLYxn88HfeaVXK0qHhkTsm4oD7tzzd69X6ekp09eKRIJJAwAAeJkcTpdPb0O+xtKiaR4KHsOHUCP5RO5TJxx56b0UJw8dda0Z/encdu2bazsm2Papc+u0tJSYVRUlJPJxeZIq9z/GRkZguTkaZufeWbxL6VSMVvbfzkcTqPNZk2XyWQnfiwAUWKEm8rQZZfW1Zn5jU0tm7093dPuBvD10Sx8+sn+vbt3//n3TEZ3d3d+ZWXtCh7PpeELhXEOm+MqYemsqCgvnDppYk5HdzcvMnK0b1paxrrMzOUxcrl0gJxWq63rw507Xnxq+fJCf53I5ZKKG2trjXW0aFCXupcF3MaP8fxtSJD6WYvFJv+moIm37u2dvHnzMgasZxZgAHbu2IHP9+/gBCEAqLlZB6ulF0KhEA6nEy6nA/v2HUDmqlXoMHbQGi/Mnb8Mr7++BncDaG9vx4J5GTBUF2B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w4coc5MjSWLHz+xa/eBJ2mrWzTILwepxN9LuHRDJMIoMR/siI2Xf/Ha76IjwyfcuY757PHjua69e/Ye/XjPe1uI1vDIlfmzZ6d57vl4fyaZmUPQ0tJcP3/u49uysnJY8Ad+uu/A4jlz5gQXFRVTpa1DbGwssdkAHDlyhD3K/N57m/cd/vKQo63duIAKlnjVqlVr3nrrrV002cBCdMgA7lxInH+3QiH+zq40yQCcOp3f+dHeT1K2bt1Ychc4duzMvUtgWiMwrI9U0Ahdu3bt0ldffXVlfX095zJEkzn/P3jwIFHo8I7s7NwVy5c/RZ7VvYe9VVm9evXv1q9fz3qB/zsAk6nnWYVC+nOmottCccKVllYWxsSEvDSYBQe5xyyi9/DwSCLhd1JWEW7durXp6aef9q6oqOgh96mJi4tvLCq69Fp6ejqfCtYX9J5A8ZMAGKKAP7SMgfagMaq4uPgtcp2YCxcuVI0ePTr4/fff/2DZsmXv0Fw5DTGNeLLAPmaB559/fu3GjRtZM9P3nqCPqj2Q16xuJEjEli1bniPNs9aVc8XU1NTlubm5Z+hra11d3SaqC9F6vT6SrMSnI5caOmS+GBwcvIzm6ZT9uzi417HKD2nyx8yzI/zApKSkySTwFub7tbW19UFBQb+k+4xh8oxG4zEK3gFMju7VaDSa8TTfSOP2ucy9z4V+jIA/9Ft2tK2jwQ4+I2mw154sOFkSYB2XkgYTnp0rejJAzCo0KmiU3V77QAEwgViGYiCYgOyziUYTDVZd2QsDFifut+fYeta8tNFopvHAXYhZiAUzHc5wwco+s9zO3riwIsUsxLIVG31pmFVftoYdJ7L/H2gQMwA/2fUggvgnE55t9A/sKLSainLTwwAAAABJRU5ErkJggg=='
  
  class UDBlockUDPiMiniV1 {
      constructor(runtime) {
          this.runtime = runtime;
          this.customBlocks = [].concat(
              sensorBlocks,
              actionBlocks(false,false),
              cameraBlocks,
          )
          this.dblRelayPinYellow = {
              acceptReporters: true,
              items: []
          };
          this.dblRelayPinBlue = {
              acceptReporters: true,
              items: []
          };
          // 双路继电器生成菜单
          for (i in extb_udpi_mini.RJ11) {
              var yellowPin = extb_udpi_mini.RJ11[i].value[0];
              var bluePin = extb_udpi_mini.RJ11[i].value[1];
              if (!(yellowPin >= 34 && yellowPin <= 39)){
                  this.dblRelayPinYellow.items.push({text:"RJ"+String(Number(i)+1), value: String(yellowPin)});
              }
              if (!(bluePin >= 34 && bluePin <= 39)){
                  this.dblRelayPinBlue.items.push({text:"RJ"+String(Number(i)+1), value: String(bluePin)});
              }
          }
      }
  
      getInfo() {
          return {
              id: "udblockUDPiMiniV1",
              name: "UDPi+最小系统板V1",
              blockIconURI: blockIconURI,
              blocks: [
                  {
                      opcode: "espstart",
                      blockType: BlockType.HAT,
                      text: "UDPi+最小系统板初始化完成"
                  },
                  {
                      opcode: "print",
                      blockType: BlockType.COMMAND,
                      text: "打印[TEXT]",
                      arguments: {
                          TEXT: {
                              type: ArgumentType.STRING,
                              defaultValue: "欢迎"
                          }
                      }
                  },
                  {
                      type: "custom_seperator",
                      text: '★ 事件',
                  },
                  {
                      opcode: 'whenButtonPressed',
                      blockType: BlockType.EVHAT,
                      text: '当主板按钮[BTN]按下',
                      arguments: {
                          BTN: {
                              type: ArgumentType.STRING,
                              defaultValue: "0",
                              menu: 'buttons'
                          }
                      }
                  },
                  {
                      type: "custom_seperator",
                      text: '★ 系统资源',
                  },
                  {
                      opcode: 'getStartTime',
                      blockType: BlockType.REPORTER,
                      text: '获取主板启动时间(毫秒)'
                  },
                  {
                      opcode: 'delay_ms',
                      blockType: BlockType.COMMAND,
                      text: '延迟[TIME]毫秒',
                      arguments: {
                          TIME: {
                              type: ArgumentType.NUMBER,
                              defaultValue: 200
                          }
                      }
                  },
                  {
                      opcode: 'delay_us',
                      blockType: BlockType.COMMAND,
                      text: '延迟[TIME]微秒',
                      arguments: {
                          TIME: {
                              type: ArgumentType.NUMBER,
                              defaultValue: 1000
                          }
                      }
                  },
                  {
                      opcode: 'delay_s',
                      blockType: BlockType.COMMAND,
                      text: '延迟[TIME]秒',
                      arguments: {
                          TIME: {
                              type: ArgumentType.NUMBER,
                              defaultValue: 1
                          }
                      }
                  },
                  {
                      type: "custom_seperator",
                      text: '★ 执行器',
                  },
                  {
                      opcode: 'openOnBoardRGB',
                      blockType: BlockType.COMMAND,
                      text: '控制启用主板RGB'
                  },
                  {
                      opcode: 'closeOnBoardRGB',
                      blockType: BlockType.COMMAND,
                      text: '控制禁用主板RGB'
                  },
                  // {
                  //     opcode: 'setLuminanceOnBoardRGB',
                  //     blockType: BlockType.COMMAND,
                  //     text: '控制主板RGB设置亮度为 [NUMBER] %',
                  //     arguments: {
                  //         NUMBER: {
                  //             type: ArgumentType.NUMBER,
                  //             defaultValue: "50"
                  //         }
                  //     }
                  // },
                  {
                      opcode: 'setRGBDraw',
                      blockType: BlockType.COMMAND,
                      text: '控制主板RGB显示颜色[COLOR]',
                      arguments: {
                          COLOR: {
                              type: ArgumentType.COLOR,
                          }
                      }
                  },
                  {
                      opcode: 'setRGBLineSingleDraw',
                      blockType: BlockType.COMMAND,
                      text: '控制主板RGB[INDEX]号灯珠显示颜色[COLOR]',
                      arguments: {
                          INDEX: {
                              type: ArgumentType.NUMBER,
                              defaultValue: 1
                          },
                          COLOR: {
                              type: ArgumentType.COLOR,
                          }
                      }
                  },
                  {
                      opcode: 'setRGBLineSingleOnlyDraw',
                      blockType: BlockType.COMMAND,
                      text: '控制主板RGB只有[INDEX]号灯珠显示颜色[COLOR]',
                      arguments: {
                          INDEX: {
                              type: ArgumentType.NUMBER,
                              defaultValue: 1
                          },
                          COLOR: {
                              type: ArgumentType.COLOR,
                          }
                      }
                  },
                  {
                      type: "custom_seperator",
                      text: '★ ▶ 蜂鸣器',
                  },
                  {
                      opcode: 'setBuzzerPlay',
                      blockType: BlockType.COMMAND,
                      text: '控制主板蜂鸣器播放[SOUND] 音调 [PITCH]',
                      arguments: {
                          SOUND: {
                              type: ArgumentType.STRING,
                              defaultValue: "DO",
                              menu: "buzzerSounds"
                          },
                          PITCH: {
                              type: ArgumentType.STRING,
                              defaultValue: "LOW",
                              menu: "buzzerPitches"
                          }
                      }
                  },
                  {
                      opcode: 'setBuzzerPlayMidi',
                      blockType: BlockType.COMMAND,
                      text: '控制主板蜂鸣器播放MIDI [SOUND]',
                      arguments: {
                          SOUND: {
                              type: ArgumentType.STRING,
                              defaultValue: "demo"
                          }
                      }
                  },
                  {
                      opcode: 'setBuzzerStop',
                      blockType: BlockType.COMMAND,
                      text: '控制主板蜂鸣器停止播放',
                  },
                  {
                      type: "custom_seperator",
                      text: '★ ▶ 网络',
                  },
                  {
                      opcode: 'getWiFiStatus',
                      blockType: BlockType.BOOLEAN,
                      text: 'Wi-Fi连接成功？',
                  },
                  {
                      opcode: 'setConnectToWiFi',
                      blockType: BlockType.COMMAND,
                      text: '控制主板连接到Wi-Fi [SSID] [PSK]',
                      arguments: {
                          SSID: {
                              type: ArgumentType.STRING,
                              defaultValue: "改为你要连接的热点名",
                          },
                          PSK: {
                              type: ArgumentType.STRING,
                              defaultValue: "改为你要连接的热点密码",
                          }
                      }
                  },
                  {
                      opcode: 'closeConnectToWiFi',
                      blockType: BlockType.COMMAND,
                      text: '控制主板断开Wi-Fi',
                  },
                  {
                      opcode: 'openWiFiAP',
                      blockType: BlockType.COMMAND,
                      text: '控制主板打开热点[SSID] [PSK]',
                      arguments: {
                          SSID: {
                              type: ArgumentType.STRING,
                              defaultValue: "udpi-" + (parseInt(Math.random() * 10000000 + ''))
                          },
                          PSK: {
                              type: ArgumentType.STRING,
                              defaultValue: "udpi12345678"
                          }
                      }
                  },
                  {
                      opcode: 'udpClientSent',
                      blockType: BlockType.COMMAND,
                      text: '控制UDP客户端发送消息[MSG]',
                      arguments: {
                          MSG: {
                              type: ArgumentType.STRING,
                              defaultValue: "ping"
                          },
                      }
                  },
                  {
                      opcode: 'udpClientReceiveEvent',
                      blockType: BlockType.EVHAT,
                      text: '当UDP服务器接收到消息',
                  },
                  {
                      opcode: 'udpClientReceivedText',
                      blockType: BlockType.REPORTER,
                      text: 'UDP消息',
                  },
                  {
                      type: "custom_seperator",
                      text: '★ ▶ HTTP请求',
                  },
                  {
                      opcode: 'urequestsAddItemMap',
                      blockType: BlockType.COMMAND,
                      text: '创建数据对象[NAME]',
                      arguments: {
                          NAME: {
                              type: ArgumentType.STRING,
                              defaultValue: 'data'
                          }
                      }
                  },
                  {
                      opcode: 'urequestsSetItem',
                      blockType: BlockType.COMMAND,
                      text: '设置数据对象[NAME]的[KEY]为[VALUE]',
                      arguments: {
                          NAME: {
                              type: ArgumentType.STRING,
                              defaultValue: 'data'
                          },
                          KEY: {
                              type: ArgumentType.STRING,
                              defaultValue: 'number'
                          },
                          VALUE: {
                              type: ArgumentType.STRING,
                              defaultValue: '6'
                          }
                      }
                  },
                  {
                      opcode: 'urequestsDelItem',
                      blockType: BlockType.COMMAND,
                      text: '删除数据对象[NAME]的[KEY]',
                      arguments: {
                          NAME: {
                              type: ArgumentType.STRING,
                              defaultValue: 'data'
                          },
                          KEY: {
                              type: ArgumentType.STRING,
                              defaultValue: 'number'
                          }
                      }
                  },
                  {
                      opcode: 'urequestsPostItem',
                      blockType: BlockType.COMMAND,
                      text: 'POST数据对象[NAME]到地址[ADDR]',
                      arguments: {
                          NAME: {
                              type: ArgumentType.STRING,
                              defaultValue: 'data'
                          },
                          ADDR: {
                              type: ArgumentType.STRING,
                              defaultValue: ' '
                          }
                      }
                  },
                  {
                      opcode: 'urequestsGetItem',
                      blockType: BlockType.COMMAND,
                      text: 'GET地址[ADDR]',
                      arguments: {
                          ADDR: {
                              type: ArgumentType.STRING,
                              defaultValue: ' '
                          }
                      }
                  },
                  ...this.customBlocks
              ],
              menus: {
                  gesture_sensor: {
                      acceptReporters: true,
                      items: [{ text: "上", value: "up" }, { text: "下", value: "down" }, { text: "左", value: "left" }, { text: "右", value: "right" }]
                  },
                  buzzerSounds: {
                      acceptReporters: true,
                      items: [{ text: "DO", value: "DO" }, { text: "RE", value: "RE" }, { text: "MI", value: "MI" }, { text: "FA", value: "FA" }, { text: "SO", value: "SO" }, { text: "LA", value: "LA" }, { text: "XI", value: "SI" }]
                  },
                  buzzerPitches: {
                      acceptReporters: true,
                      items: [{ text: "低", value: "LOW" }, { text: "中", value: "MID" }, { text: "高", value: "HIGH" }]
                  },
                  buttons: {
                      acceptReporters: true,
                      items: [{ text: "A", value: "0" }, { text: "B", value: "2" }]
                  },
                  displayLine: {
                      acceptReporters: true,
                      items: [{ text: "一", value: "0" }, { text: "二", value: "1" }, { text: "三", value: "2" }, { text: "四", value: "3" }]
                  }, color: {
                      acceptReporters: true,
                      items: [{ text: "红色", value: "red" }, { text: "绿色", value: "green" }, { text: "蓝色", value: "blue" }, { text: "黄色", value: "yellow" }, { text: "天蓝色", value: "skyblue" }, { text: "紫色", value: "purple" }, { text: "白色", value: "white" }, { text: "黑色", value: "black" }]
                  },
                  imageMethods: {
                      acceptReporters: true,
                      items: [{ text: "边缘查找", value: "iess" }, { text: "锐化", value: "ishs" }, { text: "浮雕化", value: "issr" }]
                  },
                  RJMenu: {
                      acceptReporters: true,
                      items: [
                          {text:"RJ1", value:EXTB_LIST.extb_udpi_mini.RJ11[0].value.join(",")},
                          {text:"RJ2", value:EXTB_LIST.extb_udpi_mini.RJ11[1].value.join(",")},
                          {text:"RJ3", value:EXTB_LIST.extb_udpi_mini.RJ11[2].value.join(",")},
                          {text:"RJ4", value:EXTB_LIST.extb_udpi_mini.RJ11[3].value.join(",")},
                          {text:"RJ5", value:EXTB_LIST.extb_udpi_mini.RJ11[4].value.join(",")},
                          {text:"RJ6", value:EXTB_LIST.extb_udpi_mini.RJ11[5].value.join(",")},
                          {text:"RJ7", value:EXTB_LIST.extb_udpi_mini.RJ11[6].value.join(",")},
                          {text:"RJ8", value:EXTB_LIST.extb_udpi_mini.RJ11[7].value.join(",")},
                      ]
                  },
                  RJDigiMenu: {
                      acceptReporters: true,
                      items: [
                          {text:"RJ1", value:EXTB_LIST.extb_udpi_mini.RJ11[0].value[1]},
                          {text:"RJ2", value:EXTB_LIST.extb_udpi_mini.RJ11[1].value[1]},
                          {text:"RJ3", value:EXTB_LIST.extb_udpi_mini.RJ11[2].value[1]},
                          {text:"RJ4", value:EXTB_LIST.extb_udpi_mini.RJ11[3].value[1]},
                          {text:"RJ5", value:EXTB_LIST.extb_udpi_mini.RJ11[4].value[1]},
                          {text:"RJ6", value:EXTB_LIST.extb_udpi_mini.RJ11[5].value[1]},
                          {text:"RJ7", value:EXTB_LIST.extb_udpi_mini.RJ11[6].value[1]},
                          {text:"RJ8", value:EXTB_LIST.extb_udpi_mini.RJ11[7].value[1]},
                      ]
                  },
                  RJADCMenu: {
                      acceptReporters: true,
                      items: [
                          {text:"RJ1", value:EXTB_LIST.extb_udpi_mini.RJ11[0].value[0]},
                          {text:"RJ2", value:EXTB_LIST.extb_udpi_mini.RJ11[1].value[0]},
                          {text:"RJ3", value:EXTB_LIST.extb_udpi_mini.RJ11[2].value[0]},
                          {text:"RJ4", value:EXTB_LIST.extb_udpi_mini.RJ11[3].value[0]},
                          {text:"RJ5", value:EXTB_LIST.extb_udpi_mini.RJ11[4].value[0]},
                          {text:"RJ6", value:EXTB_LIST.extb_udpi_mini.RJ11[5].value[0]},
                          {text:"RJ7", value:EXTB_LIST.extb_udpi_mini.RJ11[6].value[0]},
                          {text:"RJ8", value:EXTB_LIST.extb_udpi_mini.RJ11[7].value[0]},
                      ]
                  },
                  RJADCMenuFull: {
                      acceptReporters: true,
                      items: [
                          {text:"RJ1", value:EXTB_LIST.extb_udpi_mini.RJ11[0].value[0]},
                          {text:"RJ2", value:EXTB_LIST.extb_udpi_mini.RJ11[1].value[0]},
                          {text:"RJ3", value:EXTB_LIST.extb_udpi_mini.RJ11[2].value[0]},
                          {text:"RJ4", value:EXTB_LIST.extb_udpi_mini.RJ11[3].value[0]},
                          {text:"RJ5", value:EXTB_LIST.extb_udpi_mini.RJ11[4].value[0]},
                          {text:"RJ6", value:EXTB_LIST.extb_udpi_mini.RJ11[5].value[0]},
                          {text:"RJ7", value:EXTB_LIST.extb_udpi_mini.RJ11[6].value[0]},
                          {text:"RJ8", value:EXTB_LIST.extb_udpi_mini.RJ11[7].value[0]},
                      ]
                  },
                  dblRelayPinYellow: this.dblRelayPinYellow,
                  dblRelayPinBlue:this.dblRelayPinBlue,
                  ...miscMenuBlocks
              }
          }
      }
  
      espstart() { return false }
      whenButtonPressed() { }
      getStartTime() { }
      delay_ms() { }
      delay_us() { }
      delay_s() { }
      readAmbientLightSensor() { }
      readSoundSensor() { }
      readGryoSensor() { }
      readAccelSensor() { }
      openOnBoardRGB() { }
      closeOnBoardRGB() { }
      setLuminanceOnBoardRGB() { }
      setRGBDraw() { }
      setRGBLineDraw() { }
      setRGBLineSingleDraw() { }
      setRGBLineSingleOnlyDraw() { }
      setBuzzerPlay() { }
      setBuzzerStop() { }
      getWiFiStatus() { }
      setConnectToWiFi() { }
      closeConnectToWiFi() { }
      openWiFiAP() { }
      udpClientSent() { }
      udpClientReceiveEvent() { }
  }
  
  module.exports = UDBlockUDPiMiniV1;