/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * @fileoverview The interface for a toolbox.
 * @author aschmiedt@google.com (Abby Schmiedt)
 */

'use strict';

goog.module('Blockly.IToolbox');
goog.module.declareLegacyNamespace();

goog.requireType('Blockly.IFlyout');
goog.requireType('Blockly.IRegistrable');
goog.requireType('Blockly.IToolboxItem');
goog.requireType('Blockly.utils.toolbox');
goog.requireType('Blockly.WorkspaceSvg');


/**
 * Interface for a toolbox.
 * @extends {Blockly.IRegistrable}
 * @interface
 */
const IToolbox = function() {};

/**
 * Initializes the toolbox.
 * @return {void}
 */
IToolbox.prototype.init;

/**
 * Fills the toolbox with new toolbox items and removes any old contents.
 * @param {!Blockly.utils.toolbox.ToolboxInfo} toolboxDef Object holding information
 *     for creating a toolbox.
 */
IToolbox.prototype.render;

/**
 * Gets the width of the toolbox.
 * @return {number} The width of the toolbox.
 */
IToolbox.prototype.getWidth;

/**
 * Gets the height of the toolbox.
 * @return {number} The width of the toolbox.
 */
IToolbox.prototype.getHeight;

/**
 * Gets the toolbox flyout.
 * @return {?Blockly.IFlyout} The toolbox flyout.
 */
IToolbox.prototype.getFlyout;

/**
 * Gets the workspace for the toolbox.
 * @return {!Blockly.WorkspaceSvg} The parent workspace for the toolbox.
 */
IToolbox.prototype.getWorkspace;

/**
 * Gets whether or not the toolbox is horizontal.
 * @return {boolean} True if the toolbox is horizontal, false if the toolbox is
 *     vertical.
 */
IToolbox.prototype.isHorizontal;

/**
 * Positions the toolbox based on whether it is a horizontal toolbox and whether
 * the workspace is in rtl.
 * @return {void}
 */
IToolbox.prototype.position;

/**
 * Handles resizing the toolbox when a toolbox item resizes.
 * @return {void}
 */
IToolbox.prototype.handleToolboxItemResize;

/**
 * Unhighlights any previously selected item.
 * @return {void}
 */
IToolbox.prototype.clearSelection;

/**
 * Updates the category colours and background colour of selected categories.
 * @return {void}
 */
IToolbox.prototype.refreshTheme;

/**
 * Updates the flyout's content without closing it.  Should be used in response
 * to a change in one of the dynamic categories, such as variables or
 * procedures.
 * @return {void}
 */
IToolbox.prototype.refreshSelection;

/**
 * Sets the visibility of the toolbox.
 * @param {boolean} isVisible True if toolbox should be visible.
 */
IToolbox.prototype.setVisible;

/**
 * Selects the toolbox item by it's position in the list of toolbox items.
 * @param {number} position The position of the item to select.
 * @return {void}
 */
IToolbox.prototype.selectItemByPosition;

/**
 * Gets the selected item.
 * @return {?Blockly.IToolboxItem} The selected item, or null if no item is
 *     currently selected.
 */
IToolbox.prototype.getSelectedItem;

/**
 * Disposes of this toolbox.
 * @return {void}
 */
IToolbox.prototype.dispose;

exports = IToolbox;

@@ -272,16 +272,32 @@
 ace();%0A%0A
+const IFlyout = 
 goog.req
@@ -321,24 +321,45 @@
 .IFlyout');%0A
+const IRegistrable = 
 goog.require
@@ -350,36 +350,32 @@
 e = goog.require
-Type
 ('Blockly.IRegis
@@ -380,24 +380,45 @@
 istrable');%0A
+const IToolboxItem = 
 goog.require
@@ -443,24 +443,45 @@
 lboxItem');%0A
+const WorkspaceSvg = 
 goog.require
@@ -498,25 +498,46 @@
 kly.
-utils.toolbox');%0A
+WorkspaceSvg');%0Aconst %7BToolboxInfo%7D = 
 goog
@@ -554,36 +554,37 @@
 pe('Blockly.
-WorkspaceSvg
+utils.toolbox
 ');%0A%0A%0A/**%0A *
@@ -622,24 +622,16 @@
 xtends %7B
-Blockly.
 IRegistr
@@ -861,30 +861,8 @@
 m %7B!
-Blockly.utils.toolbox.
 Tool
@@ -1254,24 +1254,16 @@
 eturn %7B?
-Blockly.
 IFlyout%7D
@@ -1374,24 +1374,16 @@
 eturn %7B!
-Blockly.
 Workspac
@@ -2820,24 +2820,16 @@
 eturn %7B?
-Blockly.
 IToolbox

Migrate core/interfaces/i_toolbox.js named requires