import * as Blockly from 'blockly/core'; Blockly.Blocks.dialogs_alert = { init: function (this: Blockly.Block) { this.jsonInit({ message0: Blockly.Msg.DIALOGS_ALERT, args0: [ { type: 'input_value', name: 'MESSAGE', }, ], extensions: ['colours_dialogs', 'shape_statement'], }); }, }; Blockly.Blocks.dialogs_prompt = { init: function (this: Blockly.Block) { this.jsonInit({ message0: Blockly.Msg.DIALOGS_PROMPT, args0: [ { type: 'input_value', name: 'MESSAGE', }, ], extensions: ['colours_dialogs', 'output_string'], }); }, }; Blockly.Blocks.dialogs_confirm = { init: function (this: Blockly.Block) { this.jsonInit({ message0: Blockly.Msg.DIALOGS_CONFIRM, args0: [ { type: 'input_value', name: 'MESSAGE', }, ], extensions: ['colours_dialogs', 'output_boolean'], }); }, }; Blockly.Blocks.dialogs_whileconfirmed = { init: function (this: Blockly.Block) { this.jsonInit({ message0: Blockly.Msg.DIALOGS_WHILECONFIRMED, // while confirmed %1 // highlight-next-line message1: '%1', args0: [ { type: 'input_value', name: 'MESSAGE', }, ], args1: [ { type: 'input_statement', name: 'SUBSTACK', }, ], extensions: ['colours_dialogs', 'shape_statement'], }); }, }; Blockly.Blocks.dialogs_randomchoice = { init: function (this: Blockly.Block) { this.jsonInit({ message0: Blockly.Msg.DIALOGS_RANDOMCHOICE, message1: '%1', message2: '%1', message3: '%1', args1: [ { type: 'input_statement', name: 'SUBSTACK', }, ], args2: [ { type: 'input_statement', name: 'SUBSTACK2', }, ], args3: [ { type: 'input_statement', name: 'SUBSTACK3', }, ], extensions: ['colours_dialogs', 'shape_statement'], }); }, };