{"version":3,"file":"primeng-card.mjs","sources":["../../src/app/components/card/card.ts","../../src/app/components/card/primeng-card.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { AfterContentInit, AfterViewInit, ChangeDetectionStrategy, Component, ContentChild, ContentChildren, ElementRef, Input, NgModule, QueryList, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { BlockableUI, Footer, Header, LicenseManager, PrimeTemplate, SharedModule } from 'primeng/api';\n\n@Component({\n selector: 'p-card',\n template: `\n
\n
\n \n \n
\n
\n
\n {{ header }}\n \n
\n
\n {{ subheader }}\n \n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./card.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class Card implements AfterContentInit, BlockableUI, AfterViewInit {\n @Input() header: string;\n\n @Input() subheader: string;\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @ContentChild(Header) headerFacet;\n\n @ContentChild(Footer) footerFacet;\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n headerTemplate: TemplateRef;\n\n titleTemplate: TemplateRef;\n\n subtitleTemplate: TemplateRef;\n\n contentTemplate: TemplateRef;\n\n footerTemplate: TemplateRef;\n\n constructor(private el: ElementRef) {}\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch (item.getType()) {\n case 'header':\n this.headerTemplate = item.template;\n break;\n\n case 'title':\n this.titleTemplate = item.template;\n break;\n\n case 'subtitle':\n this.subtitleTemplate = item.template;\n break;\n\n case 'content':\n this.contentTemplate = item.template;\n break;\n\n case 'footer':\n this.footerTemplate = item.template;\n break;\n\n default:\n this.contentTemplate = item.template;\n break;\n }\n });\n }\n\n ngAfterViewInit() {\n LicenseManager.check();\n }\n\n getBlockableElement(): HTMLElement {\n return this.el.nativeElement.children[0];\n }\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [Card, SharedModule],\n declarations: [Card]\n})\nex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