import { __decorate } from "tslib";
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
import { MatExpansionModule } from '@angular/material/expansion';
import { CommonModule } from '@angular/common';
import { LayoutComponentBase, LayoutComponentRendererSADirective } from '@anglr/dynamic/layout';
import { DescendantsGetter, LayoutEditorMetadata } from '@anglr/dynamic/layout-editor';
import { HostDisplayBlockStyle } from '@anglr/common';
import { MaterialExpansionPanelLayoutMetadataLoader } from './expansionPanel.metadata';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/material/expansion";
/**
 * Component used for displaying toggle panel layout
 */
let MaterialExpansionPanelSAComponent = class MaterialExpansionPanelSAComponent extends LayoutComponentBase {
    constructor() {
        super(...arguments);
        //######################### public properties - inputs #########################
        /**
         * Indication whether panel is expanded
         */
        this.expanded = true;
    }
    //######################### protected - overrides #########################
    /**
     * @inheritdoc
     */
    onOptionsSet() {
        this.expanded = this.options?.expanded ?? false;
        this.title = this.options?.title;
        this.description = this.options?.description;
    }
};
MaterialExpansionPanelSAComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: MaterialExpansionPanelSAComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
MaterialExpansionPanelSAComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: MaterialExpansionPanelSAComponent, isStandalone: true, selector: "material-expansion-panel", inputs: { expanded: "expanded", title: "title", description: "description" }, usesInheritance: true, ngImport: i0, template: "<mat-expansion-panel [expanded]=\"expanded\">\n    <mat-expansion-panel-header>\n        <mat-panel-title>{{title}}</mat-panel-title>\n        <mat-panel-description>{{description}}</mat-panel-description>\n    </mat-expansion-panel-header>\n\n    <ng-container *ngFor=\"let type of options?.children\">\n        <ng-template [layoutComponentRenderer]=\"type\"></ng-template>\n    </ng-container>\n</mat-expansion-panel>", styles: [":host{display: block;}"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "component", type: i2.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i2.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i2.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i2.MatExpansionPanelDescription, selector: "mat-panel-description" }, { kind: "directive", type: LayoutComponentRendererSADirective, selector: "[layoutComponentRenderer]", inputs: ["layoutComponentRenderer", "layoutComponentRendererInjector", "layoutComponentRendererDisableTransformer"], outputs: ["layoutComponentRendererComponentChange", "componentElementChange"], exportAs: ["layoutComponentRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
MaterialExpansionPanelSAComponent = __decorate([
    DescendantsGetter(options => options?.children ?? []),
    LayoutEditorMetadata(MaterialExpansionPanelLayoutMetadataLoader)
], MaterialExpansionPanelSAComponent);
export { MaterialExpansionPanelSAComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: MaterialExpansionPanelSAComponent, decorators: [{
            type: Component,
            args: [{ selector: 'material-expansion-panel', standalone: true, imports: [
                        CommonModule,
                        MatExpansionModule,
                        LayoutComponentRendererSADirective,
                    ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-expansion-panel [expanded]=\"expanded\">\n    <mat-expansion-panel-header>\n        <mat-panel-title>{{title}}</mat-panel-title>\n        <mat-panel-description>{{description}}</mat-panel-description>\n    </mat-expansion-panel-header>\n\n    <ng-container *ngFor=\"let type of options?.children\">\n        <ng-template [layoutComponentRenderer]=\"type\"></ng-template>\n    </ng-container>\n</mat-expansion-panel>", styles: [":host{display: block;}"] }]
        }], propDecorators: { expanded: [{
                type: Input
            }], title: [{
                type: Input
            }], description: [{
                type: Input
            }] } });
//# sourceMappingURL=expansionPanel.component.js.map