import { Component, Directive, ChangeDetectionStrategy, HostBinding, ViewEncapsulation, Input, ContentChild, forwardRef, QueryList, Output, EventEmitter, } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "../../../../shared/eui-common-header/common-header.component";
import * as i2 from "@angular/common";
import * as i3 from "../../../../shared/eui-expand-content/eui-expand-content.component";
function EuiPageHeaderComponent_eui_expand_content_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function EuiPageHeaderComponent_eui_expand_content_3_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "eui-expand-content", 5);
    i0.ɵɵlistener("collapsed", function EuiPageHeaderComponent_eui_expand_content_3_Template_eui_expand_content_collapsed_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.onToggle($event); });
    i0.ɵɵtemplate(1, EuiPageHeaderComponent_eui_expand_content_3_ng_container_1_Template, 1, 0, "ng-container", 6);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    const _r2 = i0.ɵɵreference(6);
    i0.ɵɵproperty("isCollapsed", ctx_r0.isCollapsed)("expandLabel", ctx_r0.expandedLabel)("collapseLabel", ctx_r0.collapsedLabel);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngTemplateOutlet", _r2);
} }
function EuiPageHeaderComponent_ng_container_4_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function EuiPageHeaderComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, EuiPageHeaderComponent_ng_container_4_ng_container_1_Template, 1, 0, "ng-container", 6);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r2 = i0.ɵɵreference(6);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngTemplateOutlet", _r2);
} }
function EuiPageHeaderComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 7);
    i0.ɵɵprojection(1, 1);
    i0.ɵɵelementEnd();
} }
const _c0 = [[["eui-page-header-action-items"]], [["eui-page-header-body"]]];
const _c1 = ["eui-page-header-action-items", "eui-page-header-body"];
export class EuiPageHeaderComponent {
    constructor() {
        this.isCollapsible = false;
        this.isCollapsed = false;
        this.collapsedLabel = ''; // Expand
        this.expandedLabel = ''; // Collapse
        this.collapse = new EventEmitter();
    }
    get cssClasses() {
        return [
            `eui-page-header`,
            this.isCollapsible ? 'eui-page-header--collapsible' : '',
            this.isCollapsed ? 'eui-page-header--collapsed' : '',
        ].join(' ').trim();
    }
    ngOnInit() {
    }
    onToggle(collapseState) {
        this.isCollapsed = collapseState;
        this.collapse.emit(collapseState);
    }
}
/** @nocollapse */ EuiPageHeaderComponent.ɵfac = function EuiPageHeaderComponent_Factory(t) { return new (t || EuiPageHeaderComponent)(); };
/** @nocollapse */ EuiPageHeaderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: EuiPageHeaderComponent, selectors: [["eui-page-header"]], contentQueries: function EuiPageHeaderComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
        i0.ɵɵcontentQuery(dirIndex, EuiPageHeaderActionItemsContentDirective, true);
        i0.ɵɵcontentQuery(dirIndex, EuiPageBodyContentDirective, true);
    } if (rf & 2) {
        var _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.customPageHeaderActionItemsContent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.customPageHeaderBodyContent = _t.first);
    } }, hostVars: 2, hostBindings: function EuiPageHeaderComponent_HostBindings(rf, ctx) { if (rf & 2) {
        i0.ɵɵclassMap(ctx.cssClasses);
    } }, inputs: { label: "label", subLabel: "subLabel", isCollapsible: "isCollapsible", isCollapsed: "isCollapsed", collapsedLabel: "collapsedLabel", expandedLabel: "expandedLabel" }, outputs: { collapse: "collapse" }, ngContentSelectors: _c1, decls: 7, vars: 5, consts: [[3, "label", "subLabel", "isCollapsed"], [1, "eui-page-header__action-items"], [3, "isCollapsed", "expandLabel", "collapseLabel", "collapsed", 4, "ngIf"], [4, "ngIf"], ["body", ""], [3, "isCollapsed", "expandLabel", "collapseLabel", "collapsed"], [4, "ngTemplateOutlet"], [1, "eui-page-header__body"]], template: function EuiPageHeaderComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵprojectionDef(_c0);
        i0.ɵɵelementStart(0, "eui-common-header", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵprojection(2);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(3, EuiPageHeaderComponent_eui_expand_content_3_Template, 2, 4, "eui-expand-content", 2);
        i0.ɵɵtemplate(4, EuiPageHeaderComponent_ng_container_4_Template, 2, 1, "ng-container", 3);
        i0.ɵɵtemplate(5, EuiPageHeaderComponent_ng_template_5_Template, 2, 0, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor);
    } if (rf & 2) {
        i0.ɵɵproperty("label", ctx.label)("subLabel", ctx.subLabel)("isCollapsed", ctx.isCollapsed);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.isCollapsible);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !ctx.isCollapsible && ctx.customPageHeaderBodyContent);
    } }, directives: [i1.EuiCommonHeaderComponent, i2.NgIf, i3.EuiExpandContentComponent, i2.NgTemplateOutlet], encapsulation: 2 });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(EuiPageHeaderComponent, [{
        type: Component,
        args: [{
                selector: 'eui-page-header',
                templateUrl: './eui-page-header.component.html',
                changeDetection: ChangeDetectionStrategy.Default,
                encapsulation: ViewEncapsulation.None,
            }]
    }], function () { return []; }, { cssClasses: [{
            type: HostBinding,
            args: ['class']
        }], label: [{
            type: Input
        }], subLabel: [{
            type: Input
        }], isCollapsible: [{
            type: Input
        }], isCollapsed: [{
            type: Input
        }], collapsedLabel: [{
            type: Input
        }], expandedLabel: [{
            type: Input
        }], collapse: [{
            type: Output
        }], customPageHeaderActionItemsContent: [{
            type: ContentChild,
            args: [forwardRef(() => EuiPageHeaderActionItemsContentDirective)]
        }], customPageHeaderBodyContent: [{
            type: ContentChild,
            args: [forwardRef(() => EuiPageBodyContentDirective)]
        }] }); })();
/* tslint:disable */
export class EuiPageHeaderActionItemsContentDirective {
}
/** @nocollapse */ EuiPageHeaderActionItemsContentDirective.ɵfac = function EuiPageHeaderActionItemsContentDirective_Factory(t) { return new (t || EuiPageHeaderActionItemsContentDirective)(); };
/** @nocollapse */ EuiPageHeaderActionItemsContentDirective.ɵdir = i0.ɵɵdefineDirective({ type: EuiPageHeaderActionItemsContentDirective, selectors: [["eui-page-header-action-items"]] });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(EuiPageHeaderActionItemsContentDirective, [{
        type: Directive,
        args: [{ selector: 'eui-page-header-action-items' }]
    }], null, null); })();
export class EuiPageBodyContentDirective {
}
/** @nocollapse */ EuiPageBodyContentDirective.ɵfac = function EuiPageBodyContentDirective_Factory(t) { return new (t || EuiPageBodyContentDirective)(); };
/** @nocollapse */ EuiPageBodyContentDirective.ɵdir = i0.ɵɵdefineDirective({ type: EuiPageBodyContentDirective, selectors: [["eui-page-header-body"]] });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(EuiPageBodyContentDirective, [{
        type: Directive,
        args: [{ selector: 'eui-page-header-body' }]
    }], null, null); })();
//# sourceMappingURL=data:application/json;base64, 