import { Component, HostListener, Inject, ViewEncapsulation } from '@angular/core';
import { AccordionBaseItemComponent } from './accordion-base-item-component.class';
import { ACCORDION } from './accordion-token';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
export class AccordionItemComponent extends AccordionBaseItemComponent {
    constructor(accordion) {
        super(accordion);
        this.accordion = accordion;
    }
    onClick(event) {
        if (!this.disabled) {
            this.accordion.itemClickFn({
                item: this.item,
                parent: this.parent,
                event: event
            });
        }
    }
}
AccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AccordionItemComponent, deps: [{ token: ACCORDION }], target: i0.ɵɵFactoryTarget.Component });
AccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: AccordionItemComponent, selector: "d-accordion-item", host: { listeners: { "click": "onClick($event)" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"devui-accordion-splitter\" [ngClass]=\"{ 'devui-parent-list': deepth === 0 }\" [ngStyle]=\"{ left: deepth * 20 + 10 + 'px' }\"></div>\n<ng-container *ngIf=\"!itemTemplate\">\n  {{ title }}\n</ng-container>\n<ng-template\n  *ngIf=\"itemTemplate\"\n  [ngTemplateOutlet]=\"itemTemplate\"\n  [ngTemplateOutletContext]=\"{\n    parent: parent,\n    item: item,\n    deepth: deepth\n  }\"\n></ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], encapsulation: i0.ViewEncapsulation.None });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AccordionItemComponent, decorators: [{
            type: Component,
            args: [{ selector: 'd-accordion-item', encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, template: "<div class=\"devui-accordion-splitter\" [ngClass]=\"{ 'devui-parent-list': deepth === 0 }\" [ngStyle]=\"{ left: deepth * 20 + 10 + 'px' }\"></div>\n<ng-container *ngIf=\"!itemTemplate\">\n  {{ title }}\n</ng-container>\n<ng-template\n  *ngIf=\"itemTemplate\"\n  [ngTemplateOutlet]=\"itemTemplate\"\n  [ngTemplateOutletContext]=\"{\n    parent: parent,\n    item: item,\n    deepth: deepth\n  }\"\n></ng-template>\n" }]
        }], ctorParameters: function () { return [{ type: undefined, decorators: [{
                    type: Inject,
                    args: [ACCORDION]
                }] }]; }, propDecorators: { onClick: [{
                type: HostListener,
                args: ['click', ['$event']]
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3JkaW9uLWl0ZW0uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vZGV2dWkvYWNjb3JkaW9uL2FjY29yZGlvbi1pdGVtLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uL2RldnVpL2FjY29yZGlvbi9hY2NvcmRpb24taXRlbS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxNQUFNLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDbkYsT0FBTyxFQUFFLDBCQUEwQixFQUFFLE1BQU0sdUNBQXVDLENBQUM7QUFDbkYsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLG1CQUFtQixDQUFDOzs7QUFTOUMsTUFBTSxPQUFPLHNCQUF1QixTQUFRLDBCQUE2QztJQUN2RixZQUF5QyxTQUFjO1FBQ3JELEtBQUssQ0FBQ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