import { Component, HostBinding } from '@angular/core';
import { ComponentsDataService } from '../../services/components-data.service';
export var DEFAULT_INPUTS_APP_MENU_ITEM = [
    'label: app-label',
    'icon: app-icon',
    'style: app-style',
    'indent: app-indent',
    'onlyIcons: only-icons',
    'id : app-id',
    'componentDragEnabled : drag-enabled'
];
export var DEFAULT_OUTPUTS_APP_MENU_ITEM = [];
var AppMenuItemComponent = (function () {
    function AppMenuItemComponent(componentsDataService) {
        this.componentsDataService = componentsDataService;
        this.label = '';
        this.componentDragEnabled = true;
    }
    AppMenuItemComponent.prototype.ngOnInit = function () {
        if (!this.icon) {
            this.noIcon = true;
        }
    };
    AppMenuItemComponent.prototype.getDraggableData = function () {
        return this.componentsDataService.getOntimizeComponentData(this.id);
    };
    AppMenuItemComponent.DEFAULT_INPUTS_APP_MENU_ITEM = DEFAULT_INPUTS_APP_MENU_ITEM;
    AppMenuItemComponent.DEFAULT_OUTPUTS_APP_MENU_ITEM = DEFAULT_OUTPUTS_APP_MENU_ITEM;
    AppMenuItemComponent.decorators = [
        { type: Component, args: [{
                    selector: 'app-menu-item',
                    inputs: DEFAULT_INPUTS_APP_MENU_ITEM,
                    outputs: DEFAULT_OUTPUTS_APP_MENU_ITEM,
                    template: "\n    <button dnd-draggable [dragEnabled]=\"componentDragEnabled\" [dragData]=\"getDraggableData()\" [class.only-label]=\"icon\" class=\"item {{ style }}\"\n      title=\"{{ label }}\">\n      <mat-icon *ngIf=\"icon\" class=\"material-icons item-icon\" border=\"0\" [style.paddingLeft]=\"indent\">\n        {{icon}}\n      </mat-icon>\n      <div class=\"item-label\" fxLayout=\"center\">\n        <span class=\"item-label-text\">{{ label }}</span>\n      </div>\n    </button>\n  ",
                    styles: ["\n    ::-webkit-scrollbar{width:5px;height:4px}::-webkit-scrollbar-button{width:0px;height:0px}::-webkit-scrollbar-thumb{background:rgba(255,223,119,0.2)}::-webkit-scrollbar-track{background:rgba(17,17,17,0.3)}::-webkit-scrollbar-thumb:active{background:rgba(17,17,17,0.3)}::-webkit-scrollbar-thumb,::-webkit-scrollbar-track{border:none}::-webkit-scrollbar-track:hover,::-webkit-scrollbar-track:active,::-webkit-scrollbar-corner{background:transparent}o-dynamic-form-builder .dynamicform-container{height:100%}o-dynamic-form-builder .dynamicform-container .dropzone-container{height:95%;overflow:auto}:host{display:block;position:relative;width:100%;height:100%;cursor:pointer;user-select:none}button{display:block;border:0;background:inherit;color:inherit}button.dnd-drag-start{border:2px dashed #000}.item{width:100%;padding:0 8px;white-space:nowrap;overflow:hidden}.item .item-icon{width:auto;height:auto;vertical-align:middle;white-space:normal}.item .item-label{vertical-align:middle;white-space:normal}.item .item-label .item-label-text{width:100%}.item:hover{background-color:rgba(255,255,255,0.3)}.item.icon .item-icon{padding:0 !important;font-size:56px}.item.icon .item-label .item-label-text{font-size:12px}.item.list{outline:none;text-align:left;height:48px;min-width:48px}.item.list .item-icon{display:inline-block;font-size:24px}.item.list .item-label{display:inline-block;margin:0 8px}.item.fab{text-align:left;height:40px;width:40px;font-size:0.8rem;background:#da4644;border-radius:48px;margin:4px auto;box-shadow:0px 0.16em 8px -0.16em black, 0em 0em 0em 0em black inset !important}.item.fab .item-icon{display:inline-block;font-size:24px}.item.fab .item-label{display:none}.item.tab{height:48px;min-width:48px}.item.tab .item-icon{padding:0 !important;display:inline-block;font-size:24px}.item.tab .item-label{display:inline-block;margin:0 8px}.item.hub{max-width:256px;margin:0 auto}.item.hub .item-icon{padding:0 !important;font-size:128px}.item.hub .item-label .item-label-text{font-size:16px;padding-bottom:14px}:host.nolabels .item{text-align:center}:host.nolabels .item .item-icon{padding:0 !important}:host.nolabels .item .item-label{display:none !important}:host.nolabels.only-label .item{height:initial}\n  "]
                },] },
    ];
    AppMenuItemComponent.ctorParameters = function () { return [
        { type: ComponentsDataService }
    ]; };
    AppMenuItemComponent.propDecorators = {
        onlyIcons: [{ type: HostBinding, args: ['class.nolabels',] }],
        noIcon: [{ type: HostBinding, args: ['class.only-label',] }]
    };
    return AppMenuItemComponent;
}());
export { AppMenuItemComponent };
//# sourceMappingURL=app-menu-item.component.js.map