import { Component, ContentChild, EventEmitter, Input, Output, TemplateRef, ViewChild } from '@angular/core';
import { ThumbnailComponent } from '@seniorsistemas/angular-components/thumbnail';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "primeng/tooltip";
import * as i3 from "@seniorsistemas/angular-components/thumbnail";
import * as i4 from "@seniorsistemas/angular-components/button";
export class GlobalSearchDropdownItemComponent {
    static nextId = 0;
    id = `s-global-search-dropdown-item-${GlobalSearchDropdownItemComponent.nextId++}`;
    primaryLabel;
    secondaryEmptyLabel;
    tertiaryEmptyLabel;
    imageSource;
    imageAlt;
    iconClass;
    secondaryLabel;
    tertiaryLabel;
    size = 'standart';
    template = null;
    buttonClick = new EventEmitter();
    thumbnailComponent = null;
    content = null;
    isMediumSize() {
        return this.size === 'medium';
    }
    isSmallSize() {
        return this.size === 'small';
    }
    getImageSize() {
        return this._isStandardSize() ? 'medium' : 'small';
    }
    _isStandardSize() {
        return this.size === 'standart';
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GlobalSearchDropdownItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: GlobalSearchDropdownItemComponent, selector: "s-global-search-dropdown-item", inputs: { id: "id", primaryLabel: "primaryLabel", secondaryEmptyLabel: "secondaryEmptyLabel", tertiaryEmptyLabel: "tertiaryEmptyLabel", imageSource: "imageSource", imageAlt: "imageAlt", iconClass: "iconClass", secondaryLabel: "secondaryLabel", tertiaryLabel: "tertiaryLabel", size: "size", template: "template" }, outputs: { buttonClick: "buttonClick" }, queries: [{ propertyName: "thumbnailComponent", first: true, predicate: ThumbnailComponent, descendants: true, static: true }], viewQueries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true, static: true }], ngImport: i0, template: "<ng-template>\n    <div class=\"global-search-dropdown-item\" [class.ui-grid]=\"isSmallSize()\">\n        <ng-content select=\"s-thumbnail\"></ng-content>\n\n        @if (!thumbnailComponent && (imageSource || iconClass) && !isSmallSize()) {\n            <s-thumbnail\n                [id]=\"id + '-thumbnail'\"\n                [imageSource]=\"imageSource\"\n                [imageAlt]=\"imageAlt || primaryLabel\"\n                [iconClass]=\"iconClass ?? ''\"\n                [size]=\"getImageSize()\"\n            ></s-thumbnail>\n        }\n\n        <div class=\"global-search-item__container {{ !isSmallSize() ? 'global-search-item__container--width-60' : '' }}\">\n            <div #titleTemplate>\n                <ng-content select=\"[titleTemplate]\"></ng-content>\n            </div>\n            @if (!titleTemplate.children.length) {\n                <s-button\n                    styleClass=\"no-padding\"\n                    class=\"{{ isSmallSize() ? 'ui-grid-col-6 no-padding' : '' }}\"\n                    [id]=\"id + '-title'\"\n                    priority=\"link\"\n                    [pTooltip]=\"primaryLabel\"\n                    [label]=\"primaryLabel\"\n                    size=\"small\"\n                    (clicked)=\"buttonClick.emit()\"\n                >\n                </s-button>\n            }\n\n            <div #labelTemplate>\n                <ng-content select=\"[labelTemplate]\"></ng-content>\n            </div>\n\n            @if (!labelTemplate.children.length) {\n                <span\n                    [id]=\"id + '-label'\"\n                    [ngClass]=\"{\n                        'ui-grid-col-6 global-search-item__text-align--right': isSmallSize(),\n                        'global-search-item__italic': !secondaryLabel,\n                    }\"\n                    class=\"label\"\n                    [pTooltip]=\"secondaryLabel\"\n                    tooltipPosition=\"top\"\n                    showDelay=\"500\"\n                    >{{ secondaryLabel ? secondaryLabel : secondaryEmptyLabel }}</span\n                >\n            }\n\n            <div #descriptionTemplate>\n                <ng-content select=\"[descriptionTemplate]\"></ng-content>\n            </div>\n\n            @if (!descriptionTemplate.children.length && !isMediumSize() && !isSmallSize()) {\n                <span\n                    [id]=\"id + '-description'\"\n                    class=\"description\"\n                    [ngClass]=\"{ 'global-search-item__italic': !secondaryLabel }\"\n                    [pTooltip]=\"tertiaryLabel\"\n                    tooltipPosition=\"top\"\n                    showDelay=\"500\"\n                >\n                    {{ tertiaryLabel ? tertiaryLabel : tertiaryEmptyLabel }}\n                </span>\n            }\n        </div>\n        @if (!isSmallSize()) {\n            <div class=\"global-search-item__container--width-40 global-search__dropdown--template\">\n                <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n            </div>\n        }\n    </div>\n</ng-template>\n", styles: [".global-search-dropdown{align-items:center;display:flex;height:100%;border-bottom:solid 1px #ccc;padding:15px 5px;margin:0 10px}::ng-deep .no-padding{padding:0!important;min-width:0px!important}::ng-deep .s-button-with-text{min-width:0px!important}.global-search-item__italic{font-style:italic}.global-search-item__container{margin-left:10px;width:100%}.global-search-item__container,.global-search-item__container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.global-search-item__container .label{color:#333;display:block}.global-search-item__container .description{color:#999;display:block}.global-search-item__container--width-60{width:60%}.global-search-item__container--width-40{width:40%}.global-search-item__text-align--right{text-align:right;padding:2px 0 0 15px}.global-search__dropdown--template{display:flex;flex-direction:column;text-align:right!important}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.global-search-item__container{flex:1}}@media (max-width: 767px){.global-search-item__container,.global-search-item__container span{white-space:normal}}.global-search-item__container:only-child{margin-left:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i3.ThumbnailComponent, selector: "s-thumbnail", inputs: ["id", "size", "imageSource", "imageFallback", "imageAlt", "iconClass", "hasAction", "actionIconClass", "isTile", "isBrand"] }, { kind: "component", type: i4.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor", "menuAriaLabel"], outputs: ["clicked"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GlobalSearchDropdownItemComponent, decorators: [{
            type: Component,
            args: [{ selector: 's-global-search-dropdown-item', template: "<ng-template>\n    <div class=\"global-search-dropdown-item\" [class.ui-grid]=\"isSmallSize()\">\n        <ng-content select=\"s-thumbnail\"></ng-content>\n\n        @if (!thumbnailComponent && (imageSource || iconClass) && !isSmallSize()) {\n            <s-thumbnail\n                [id]=\"id + '-thumbnail'\"\n                [imageSource]=\"imageSource\"\n                [imageAlt]=\"imageAlt || primaryLabel\"\n                [iconClass]=\"iconClass ?? ''\"\n                [size]=\"getImageSize()\"\n            ></s-thumbnail>\n        }\n\n        <div class=\"global-search-item__container {{ !isSmallSize() ? 'global-search-item__container--width-60' : '' }}\">\n            <div #titleTemplate>\n                <ng-content select=\"[titleTemplate]\"></ng-content>\n            </div>\n            @if (!titleTemplate.children.length) {\n                <s-button\n                    styleClass=\"no-padding\"\n                    class=\"{{ isSmallSize() ? 'ui-grid-col-6 no-padding' : '' }}\"\n                    [id]=\"id + '-title'\"\n                    priority=\"link\"\n                    [pTooltip]=\"primaryLabel\"\n                    [label]=\"primaryLabel\"\n                    size=\"small\"\n                    (clicked)=\"buttonClick.emit()\"\n                >\n                </s-button>\n            }\n\n            <div #labelTemplate>\n                <ng-content select=\"[labelTemplate]\"></ng-content>\n            </div>\n\n            @if (!labelTemplate.children.length) {\n                <span\n                    [id]=\"id + '-label'\"\n                    [ngClass]=\"{\n                        'ui-grid-col-6 global-search-item__text-align--right': isSmallSize(),\n                        'global-search-item__italic': !secondaryLabel,\n                    }\"\n                    class=\"label\"\n                    [pTooltip]=\"secondaryLabel\"\n                    tooltipPosition=\"top\"\n                    showDelay=\"500\"\n                    >{{ secondaryLabel ? secondaryLabel : secondaryEmptyLabel }}</span\n                >\n            }\n\n            <div #descriptionTemplate>\n                <ng-content select=\"[descriptionTemplate]\"></ng-content>\n            </div>\n\n            @if (!descriptionTemplate.children.length && !isMediumSize() && !isSmallSize()) {\n                <span\n                    [id]=\"id + '-description'\"\n                    class=\"description\"\n                    [ngClass]=\"{ 'global-search-item__italic': !secondaryLabel }\"\n                    [pTooltip]=\"tertiaryLabel\"\n                    tooltipPosition=\"top\"\n                    showDelay=\"500\"\n                >\n                    {{ tertiaryLabel ? tertiaryLabel : tertiaryEmptyLabel }}\n                </span>\n            }\n        </div>\n        @if (!isSmallSize()) {\n            <div class=\"global-search-item__container--width-40 global-search__dropdown--template\">\n                <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n            </div>\n        }\n    </div>\n</ng-template>\n", styles: [".global-search-dropdown{align-items:center;display:flex;height:100%;border-bottom:solid 1px #ccc;padding:15px 5px;margin:0 10px}::ng-deep .no-padding{padding:0!important;min-width:0px!important}::ng-deep .s-button-with-text{min-width:0px!important}.global-search-item__italic{font-style:italic}.global-search-item__container{margin-left:10px;width:100%}.global-search-item__container,.global-search-item__container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.global-search-item__container .label{color:#333;display:block}.global-search-item__container .description{color:#999;display:block}.global-search-item__container--width-60{width:60%}.global-search-item__container--width-40{width:40%}.global-search-item__text-align--right{text-align:right;padding:2px 0 0 15px}.global-search__dropdown--template{display:flex;flex-direction:column;text-align:right!important}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.global-search-item__container{flex:1}}@media (max-width: 767px){.global-search-item__container,.global-search-item__container span{white-space:normal}}.global-search-item__container:only-child{margin-left:0}\n"] }]
        }], propDecorators: { id: [{
                type: Input
            }], primaryLabel: [{
                type: Input
            }], secondaryEmptyLabel: [{
                type: Input
            }], tertiaryEmptyLabel: [{
                type: Input
            }], imageSource: [{
                type: Input
            }], imageAlt: [{
                type: Input
            }], iconClass: [{
                type: Input
            }], secondaryLabel: [{
                type: Input
            }], tertiaryLabel: [{
                type: Input
            }], size: [{
                type: Input
            }], template: [{
                type: Input
            }], buttonClick: [{
                type: Output
            }], thumbnailComponent: [{
                type: ContentChild,
                args: [ThumbnailComponent, { static: true }]
            }], content: [{
                type: ViewChild,
                args: [TemplateRef, { static: true }]
            }] } });
//# sourceMappingURL=data:application/json;base64, 