{"version":3,"file":"primeng-chip.mjs","sources":["../../src/app/components/chip/chip.ts","../../src/app/components/chip/primeng-chip.ts"],"sourcesContent":["import { NgModule, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, EventEmitter } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n    selector: 'p-chip',\n    template: `\n        <div [ngClass]=\"containerClass()\" [class]=\"styleClass\" [ngStyle]=\"style\" *ngIf=\"visible\">\n            <ng-content></ng-content>\n            <img [src]=\"image\" *ngIf=\"image;else iconTemplate\">\n            <ng-template #iconTemplate><span *ngIf=\"icon\" [class]=\"icon\" [ngClass]=\"'p-chip-icon'\"></span></ng-template>\n            <div class=\"p-chip-text\" *ngIf=\"label\">{{label}}</div>\n            <span *ngIf=\"removable\" tabindex=\"0\" [class]=\"removeIcon\" [ngClass]=\"'pi-chip-remove-icon'\" (click)=\"close($event)\" (keydown.enter)=\"close($event)\"></span>\n        </div>\n    `,\n    changeDetection: ChangeDetectionStrategy.OnPush,\n    encapsulation: ViewEncapsulation.None,\n    styleUrls: ['./chip.css'],\n    host: {\n        'class': 'p-element'\n    }\n})\nexport class Chip {\n\n    @Input() label: string;\n\n    @Input() icon: string;\n\n    @Input() image: string;\n\n    @Input() style: any;\n\n    @Input() styleClass: string;\n\n    @Input() removable: boolean;\n\n    @Input() removeIcon: string = \"pi pi-times-circle\";\n\n    @Output() onRemove: EventEmitter<any> = new EventEmitter();\n\n    visible: boolean = true;\n\n    containerClass() {\n        return {\n            'p-chip p-component': true,\n            'p-chip-image': this.image != null\n        };\n    }\n\n    close(event) {\n        this.visible = false;\n        this.onRemove.emit(event)\n    }\n}\n\n@NgModule({\n    imports: [CommonModule],\n    exports: [Chip],\n    declarations: [Chip]\n})\nexport class ChipModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;MAqBa,IAAI;IAlBjB;QAgCa,eAAU,GAAW,oBAAoB,CAAC;QAEzC,aAAQ,GAAsB,IAAI,YAAY,EAAE,CAAC;QAE3D,YAAO,GAAY,IAAI,CAAC;KAa3B;IAXG,cAAc;QACV,OAAO;YACH,oBAAoB,EAAE,IAAI;YAC1B,cAAc,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI;SACrC,CAAC;KACL;IAED,KAAK,CAAC,KAAK;QACP,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;KAC5B;;iGA9BQ,IAAI;qFAAJ,IAAI,8QAhBH;;;;;;;;KAQT;2FAQQ,IAAI;kBAlBhB,SAAS;+BACI,QAAQ,YACR;;;;;;;;KAQT,mBACgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,QAE/B;wBACF,OAAO,EAAE,WAAW;qBACvB;8BAIQ,KAAK;sBAAb,KAAK;gBAEG,IAAI;sBAAZ,KAAK;gBAEG,KAAK;sBAAb,KAAK;gBAEG,KAAK;sBAAb,KAAK;gBAEG,UAAU;sBAAlB,KAAK;gBAEG,SAAS;sBAAjB,KAAK;gBAEG,UAAU;sBAAlB,KAAK;gBAEI,QAAQ;sBAAjB,MAAM;;MAsBE,UAAU;;uGAAV,UAAU;wGAAV,UAAU,iBAtCV,IAAI,aAkCH,YAAY,aAlCb,IAAI;wGAsCJ,UAAU,YAJV,CAAC,YAAY,CAAC;2FAId,UAAU;kBALtB,QAAQ;mBAAC;oBACN,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,IAAI,CAAC;oBACf,YAAY,EAAE,CAAC,IAAI,CAAC;iBACvB;;;AC1DD;;;;;;"}