{"version":3,"file":"primeng-card.js","sources":["../../src/app/components/card/card.ts","../../src/app/components/card/primeng-card.ts"],"sourcesContent":["import { NgModule, Component, Input, ElementRef, ContentChild, ChangeDetectionStrategy, ViewEncapsulation, TemplateRef, AfterContentInit, ContentChildren, QueryList } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SharedModule, Header, Footer, PrimeTemplate } from 'primeng/api';\nimport { BlockableUI } 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})\nexport class Card implements AfterContentInit,BlockableUI {\n\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 getBlockableElement(): HTMLElement  {\n return this.el.nativeElement.children[0];\n }\n\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [Card, SharedModule],\n declarations: [Card]\n})\nexport class CardModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"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