import * as i0 from '@angular/core';
import { EventEmitter, input, Component, Input, Output, HostListener, NgModule } from '@angular/core';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import * as i2 from '@seniorsistemas/angular-components/info-sign';
import { InfoSignModule } from '@seniorsistemas/angular-components/info-sign';
import * as i3 from '@seniorsistemas/angular-components/tooltip';
import { TooltipModule } from '@seniorsistemas/angular-components/tooltip';
import { TemplateModule } from '@seniorsistemas/angular-components/template';

class BadgeComponent {
    type = 'pill';
    color = 'blue';
    title;
    text;
    selectable = false;
    iconClass;
    iconPosition = 'left';
    infoSign;
    selected = new EventEmitter();
    onClick() {
        this.selected.emit(this.text);
    }
    enableTruncateText = input(false);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: BadgeComponent, selector: "s-badge", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: false, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: false, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: false, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: false, isRequired: false, transformFunction: null }, iconClass: { classPropertyName: "iconClass", publicName: "iconClass", isSignal: false, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: false, isRequired: false, transformFunction: null }, infoSign: { classPropertyName: "infoSign", publicName: "infoSign", isSignal: false, isRequired: false, transformFunction: null }, enableTruncateText: { classPropertyName: "enableTruncateText", publicName: "enableTruncateText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0, template: "<span\n    class=\"badge\"\n    [ngClass]=\"{\n        'badge--pill': type === 'pill',\n        'badge--chip': type === 'chip',\n        'badge--red': color === 'red',\n        'badge--orange': color === 'orange',\n        'badge--yellow': color === 'yellow',\n        'badge--blue': color === 'blue',\n        'badge--green': color === 'green',\n        'badge--gray': color === 'gray',\n        'badge--selectable': selectable,\n    }\"\n>\n    <div class=\"flex items-center gap-2\">\n        @if (infoSign) {\n            <span *sInfoSign=\"infoSign.text; displayTime: infoSign.displayTime ?? 0\"></span>\n        }\n        @if (iconClass) {\n            <span\n                [class.pr-2]=\"text\"\n                [class]=\"'badge-icon ' + iconClass\"\n                [ngClass]=\"{\n                    'badge-icon--left': iconPosition === 'left' && text,\n                    'badge-icon--right': iconPosition === 'right' && text,\n                }\"\n            >\n            </span>\n        }\n    </div>\n    @if (title) {\n        <span class=\"badge-title\">{{ title }}:</span>\n    }\n    <span\n        class=\"badge-text\"\n        [class.badge-text-truncated]=\"enableTruncateText()\"\n        [sTooltip]=\"text\"\n        [visible]=\"enableTruncateText()\"\n        [checkTruncatedText]=\"enableTruncateText()\"\n        >{{ text }}</span\n    >\n</span>\n\n", styles: ["::ng-deep .info-sign .info-sign__icon{padding:0!important}.badge{align-items:center;max-width:100%;display:inline-flex;min-height:1.25rem;justify-content:center;min-width:20px;padding:0 .5rem}.badge--chip{border-radius:4px}.badge--pill{border-radius:12px}.badge .badge-title{color:#212533;font-family:Open Sans,sans-serif;font-size:12px;font-weight:700;line-height:150%;margin-right:.125rem}.badge-text{color:#212533;font-family:Open Sans,sans-serif;font-size:.75rem;font-weight:400;line-height:150%}.badge-text-truncated{text-overflow:ellipsis;overflow:hidden;line-clamp:1;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box}.badge .badge-icon{color:#212533;font-size:10px}.badge .badge-icon--right{order:2}.badge--red{background-color:#fcd2d2;border:1px solid #c13018}.badge--orange{background-color:#fce3ba;border:1px solid #f8931f}.badge--yellow{background-color:#fef4e3;border:1px solid #fcbf10}.badge--blue{background-color:#d5e8ec;border:1px solid #428bca}.badge--green{background-color:#e6ffb3;border:1px solid #0c9348}.badge--gray{background-color:#e5eaea;border:1px solid #697882}.badge--selectable{cursor:pointer;-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.InfoSignDirective, selector: "[sInfoSign]", inputs: ["sInfoSign", "sInfoSignDisplayTime", "sInfoSignFocusedInputRef", "sInfoSignUseFocusedInputRef"] }, { kind: "directive", type: i3.TooltipDirective, selector: "[sTooltip]", inputs: ["sTooltip", "tooltipPosition", "showDelay", "displayTime", "tooltipEvent", "escape", "visible", "mobileBehavior", "focusedInputRef", "checkTruncatedText"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BadgeComponent, decorators: [{
            type: Component,
            args: [{ selector: 's-badge', template: "<span\n    class=\"badge\"\n    [ngClass]=\"{\n        'badge--pill': type === 'pill',\n        'badge--chip': type === 'chip',\n        'badge--red': color === 'red',\n        'badge--orange': color === 'orange',\n        'badge--yellow': color === 'yellow',\n        'badge--blue': color === 'blue',\n        'badge--green': color === 'green',\n        'badge--gray': color === 'gray',\n        'badge--selectable': selectable,\n    }\"\n>\n    <div class=\"flex items-center gap-2\">\n        @if (infoSign) {\n            <span *sInfoSign=\"infoSign.text; displayTime: infoSign.displayTime ?? 0\"></span>\n        }\n        @if (iconClass) {\n            <span\n                [class.pr-2]=\"text\"\n                [class]=\"'badge-icon ' + iconClass\"\n                [ngClass]=\"{\n                    'badge-icon--left': iconPosition === 'left' && text,\n                    'badge-icon--right': iconPosition === 'right' && text,\n                }\"\n            >\n            </span>\n        }\n    </div>\n    @if (title) {\n        <span class=\"badge-title\">{{ title }}:</span>\n    }\n    <span\n        class=\"badge-text\"\n        [class.badge-text-truncated]=\"enableTruncateText()\"\n        [sTooltip]=\"text\"\n        [visible]=\"enableTruncateText()\"\n        [checkTruncatedText]=\"enableTruncateText()\"\n        >{{ text }}</span\n    >\n</span>\n\n", styles: ["::ng-deep .info-sign .info-sign__icon{padding:0!important}.badge{align-items:center;max-width:100%;display:inline-flex;min-height:1.25rem;justify-content:center;min-width:20px;padding:0 .5rem}.badge--chip{border-radius:4px}.badge--pill{border-radius:12px}.badge .badge-title{color:#212533;font-family:Open Sans,sans-serif;font-size:12px;font-weight:700;line-height:150%;margin-right:.125rem}.badge-text{color:#212533;font-family:Open Sans,sans-serif;font-size:.75rem;font-weight:400;line-height:150%}.badge-text-truncated{text-overflow:ellipsis;overflow:hidden;line-clamp:1;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box}.badge .badge-icon{color:#212533;font-size:10px}.badge .badge-icon--right{order:2}.badge--red{background-color:#fcd2d2;border:1px solid #c13018}.badge--orange{background-color:#fce3ba;border:1px solid #f8931f}.badge--yellow{background-color:#fef4e3;border:1px solid #fcbf10}.badge--blue{background-color:#d5e8ec;border:1px solid #428bca}.badge--green{background-color:#e6ffb3;border:1px solid #0c9348}.badge--gray{background-color:#e5eaea;border:1px solid #697882}.badge--selectable{cursor:pointer;-webkit-user-select:none;user-select:none}\n"] }]
        }], propDecorators: { type: [{
                type: Input
            }], color: [{
                type: Input
            }], title: [{
                type: Input
            }], text: [{
                type: Input
            }], selectable: [{
                type: Input
            }], iconClass: [{
                type: Input
            }], iconPosition: [{
                type: Input
            }], infoSign: [{
                type: Input
            }], selected: [{
                type: Output
            }], onClick: [{
                type: HostListener,
                args: ['click']
            }] } });

class BadgeModule {
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: BadgeModule, declarations: [BadgeComponent], imports: [CommonModule, RouterModule, InfoSignModule, TooltipModule, TemplateModule], exports: [BadgeComponent, RouterModule] });
    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BadgeModule, imports: [CommonModule, RouterModule, InfoSignModule, TooltipModule, TemplateModule, RouterModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BadgeModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule, RouterModule, InfoSignModule, TooltipModule, TemplateModule],
                    declarations: [BadgeComponent],
                    exports: [BadgeComponent, RouterModule],
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { BadgeComponent, BadgeModule };
//# sourceMappingURL=seniorsistemas-angular-components-badge.mjs.map
