"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var ToolbarButton_1 = require("./ToolbarButton"); var uuid_1 = require("../utils/uuid"); var Toolbar = (function () { function Toolbar(toolbarItems, clickHandler) { var _this = this; this.id = uuid_1.uuid(); this.getUI = function () { _this.toolbarUI = document.createElement('div'); _this.toolbarUI.id = "fcw-toolbar-" + _this.id; _this.toolbarUI.className = 'fc-whiteboard-toolbar'; for (var _i = 0, _a = _this.toolbarItems; _i < _a.length; _i++) { var toolbarItem = _a[_i]; var toolbarButton = new ToolbarButton_1.ToolbarButton(toolbarItem, _this.clickHandler); _this.toolbarUI.appendChild(toolbarButton.getElement()); } return _this.toolbarUI; }; this.toolbarItems = toolbarItems; this.clickHandler = clickHandler; } Toolbar.prototype.hide = function () { this.toolbarUI.style.opacity = '0'; this.toolbarUI.style.zIndex = '-1'; }; Toolbar.prototype.show = function () { this.toolbarUI.style.opacity = '1'; this.toolbarUI.style.zIndex = '999'; }; return Toolbar; }()); exports.Toolbar = Toolbar;