/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, NgModule, EventEmitter, Output, Input, ViewChild, ElementRef, ContentChild, HostBinding } from '@angular/core';
import { IgxExpansionPanelModule } from '../expansion-panel/expansion-panel.module';
import { IgxExpansionPanelComponent } from '../expansion-panel';
import { IgxIconModule, IgxIconComponent } from '../icon/index';
import { IgxButtonModule } from '../directives/button/button.directive';
import { IgxRippleModule } from '../directives/ripple/ripple.directive';
import { IgxBannerActionsDirective } from './banner.directives';
import { CommonModule } from '@angular/common';
/**
 * @record
 */
export function BannerEventArgs() { }
if (false) {
    /** @type {?} */
    BannerEventArgs.prototype.banner;
    /** @type {?|undefined} */
    BannerEventArgs.prototype.event;
}
/**
 * @record
 */
export function BannerCancelEventArgs() { }
/**
 * **Ignite UI for Angular Banner** -
 * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/banner.html)
 *
 * The Ignite UI Banner provides a highly templateable and easy to use banner that can be shown in your application.
 *
 * Usage:
 *
 * ```html
 * <igx-banner #banner>
 *   Our privacy settings have changed.
 *  <igx-banner-actions>
 *      <button igxButton="raised">Read More</button>
 *      <button igxButton="raised">Accept and Continue</button>
 *  </igx-banner-actions>
 * </igx-banner>
 * ```
 */
var IgxBannerComponent = /** @class */ (function () {
    function IgxBannerComponent(elementRef) {
        this.elementRef = elementRef;
        /**
         * Fires after the banner shows up
         * ```typescript
         * public handleOpened(event) {
         *  ...
         * }
         * ```
         * ```html
         * <igx-banner (onOpened)="handleOpened($event)"></igx-banner>
         * ```
         */
        this.onOpened = new EventEmitter();
        /**
         * Fires before the banner shows up
         * ```typescript
         * public handleOpening(event) {
         *  ...
         * }
         * ```
         * ```html
         * <igx-banner (onOpening)="handleOpening($event)"></igx-banner>
         * ```
         */
        this.onOpening = new EventEmitter();
        /**
         * Fires after the banner hides
         * ```typescript
         * public handleClosed(event) {
         *  ...
         * }
         * ```
         * ```html
         * <igx-banner (onClosed)="handleClosed($event)"></igx-banner>
         * ```
         */
        this.onClosed = new EventEmitter();
        /**
         * Fires before the banner hides
         * ```typescript
         * public handleClosing(event) {
         *  ...
         * }
         * ```
         * ```html
         * <igx-banner (onClosing)="handleClosing($event)"></igx-banner>
         * ```
         */
        this.onClosing = new EventEmitter();
    }
    Object.defineProperty(IgxBannerComponent.prototype, "useDefaultTemplate", {
        /** @hidden */
        get: /**
         * @hidden
         * @return {?}
         */
        function () {
            return !this._bannerActionTemplate;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxBannerComponent.prototype, "animationSettings", {
        /**
         * Get the animation settings used by the banner open/close methods
         * ```typescript
         * let currentAnimations: AnimationSettings = banner.animationSettings
         * ```
         */
        get: /**
         * Get the animation settings used by the banner open/close methods
         * ```typescript
         * let currentAnimations: AnimationSettings = banner.animationSettings
         * ```
         * @return {?}
         */
        function () {
            return this._animationSettings ? this._animationSettings : this._expansionPanel.animationSettings;
        },
        /**
         * Set the animation settings used by the banner open/close methods
         * ```typescript
         * import { slideInLeft, slideOutRight } from 'igniteui-angular';
         * ...
         * banner.animationSettings: AnimationSettings = { openAnimation: slideInLeft, closeAnimation: slideOutRight };
         * ```
         */
        set: /**
         * Set the animation settings used by the banner open/close methods
         * ```typescript
         * import { slideInLeft, slideOutRight } from 'igniteui-angular';
         * ...
         * banner.animationSettings: AnimationSettings = { openAnimation: slideInLeft, closeAnimation: slideOutRight };
         * ```
         * @param {?} settings
         * @return {?}
         */
        function (settings) {
            this._animationSettings = settings;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxBannerComponent.prototype, "collapsed", {
        /**
         * Gets whether banner is collapsed
         *
         * ```typescript
         * const isCollapsed: boolean = banner.collapsed;
         * ```
         */
        get: /**
         * Gets whether banner is collapsed
         *
         * ```typescript
         * const isCollapsed: boolean = banner.collapsed;
         * ```
         * @return {?}
         */
        function () {
            return this._expansionPanel.collapsed;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxBannerComponent.prototype, "element", {
        /**
         * Returns the native element of the banner component
         * ```typescript
         *  const myBannerElement: HTMLElement = banner.element;
         * ```
         */
        get: /**
         * Returns the native element of the banner component
         * ```typescript
         *  const myBannerElement: HTMLElement = banner.element;
         * ```
         * @return {?}
         */
        function () {
            return this.elementRef.nativeElement;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxBannerComponent.prototype, "displayStyle", {
        /**
         * @hidden
         */
        get: /**
         * @hidden
         * @return {?}
         */
        function () {
            return this.collapsed ? '' : 'block';
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Opens the banner
     *
     * ```typescript
     *  myBanner.open();
     * ```
     *
     * ```html
     * <igx-banner #banner>
     * ...
     * </igx-banner>
     * <button (click)="banner.open()">Open Banner</button>
     * ```
     */
    /**
     * Opens the banner
     *
     * ```typescript
     *  myBanner.open();
     * ```
     *
     * ```html
     * <igx-banner #banner>
     * ...
     * </igx-banner>
     * <button (click)="banner.open()">Open Banner</button>
     * ```
     * @param {?=} event
     * @return {?}
     */
    IgxBannerComponent.prototype.open = /**
     * Opens the banner
     *
     * ```typescript
     *  myBanner.open();
     * ```
     *
     * ```html
     * <igx-banner #banner>
     * ...
     * </igx-banner>
     * <button (click)="banner.open()">Open Banner</button>
     * ```
     * @param {?=} event
     * @return {?}
     */
    function (event) {
        this._bannerEvent = { banner: this, event: event };
        /** @type {?} */
        var openingArgs = {
            banner: this,
            event: event,
            cancel: false
        };
        this.onOpening.emit(openingArgs);
        if (openingArgs.cancel) {
            return;
        }
        this._expansionPanel.open(event);
    };
    /**
     * Closes the banner
     *
     * ```typescript
     *  myBanner.close();
     * ```
     *
     * ```html
     * <igx-banner #banner>
     * ...
     * </igx-banner>
     * <button (click)="banner.close()">Close Banner</button>
     * ```
     */
    /**
     * Closes the banner
     *
     * ```typescript
     *  myBanner.close();
     * ```
     *
     * ```html
     * <igx-banner #banner>
     * ...
     * </igx-banner>
     * <button (click)="banner.close()">Close Banner</button>
     * ```
     * @param {?=} event
     * @return {?}
     */
    IgxBannerComponent.prototype.close = /**
     * Closes the banner
     *
     * ```typescript
     *  myBanner.close();
     * ```
     *
     * ```html
     * <igx-banner #banner>
     * ...
     * </igx-banner>
     * <button (click)="banner.close()">Close Banner</button>
     * ```
     * @param {?=} event
     * @return {?}
     */
    function (event) {
        this._bannerEvent = { banner: this, event: event };
        /** @type {?} */
        var closingArgs = {
            banner: this,
            event: event,
            cancel: false
        };
        this.onClosing.emit(closingArgs);
        if (closingArgs.cancel) {
            return;
        }
        this._expansionPanel.close(event);
    };
    /**
     * Toggles the banner
     *
     * ```typescript
     *  myBanner.toggle();
     * ```
     *
     * ```html
     * <igx-banner #banner>
     * ...
     * </igx-banner>
     * <button (click)="banner.toggle()">Toggle Banner</button>
     * ```
     */
    /**
     * Toggles the banner
     *
     * ```typescript
     *  myBanner.toggle();
     * ```
     *
     * ```html
     * <igx-banner #banner>
     * ...
     * </igx-banner>
     * <button (click)="banner.toggle()">Toggle Banner</button>
     * ```
     * @param {?=} event
     * @return {?}
     */
    IgxBannerComponent.prototype.toggle = /**
     * Toggles the banner
     *
     * ```typescript
     *  myBanner.toggle();
     * ```
     *
     * ```html
     * <igx-banner #banner>
     * ...
     * </igx-banner>
     * <button (click)="banner.toggle()">Toggle Banner</button>
     * ```
     * @param {?=} event
     * @return {?}
     */
    function (event) {
        if (this.collapsed) {
            this.open(event);
        }
        else {
            this.close(event);
        }
    };
    /** @hidden */
    /**
     * @hidden
     * @return {?}
     */
    IgxBannerComponent.prototype.onExpansionPanelOpen = /**
     * @hidden
     * @return {?}
     */
    function () {
        this.onOpened.emit(this._bannerEvent);
    };
    /** @hidden */
    /**
     * @hidden
     * @return {?}
     */
    IgxBannerComponent.prototype.onExpansionPanelClose = /**
     * @hidden
     * @return {?}
     */
    function () {
        this.onClosed.emit(this._bannerEvent);
    };
    IgxBannerComponent.decorators = [
        { type: Component, args: [{
                    selector: 'igx-banner',
                    template: "<igx-expansion-panel #expansionPanel [animationSettings]=\"animationSettings\" (onCollapsed)=\"onExpansionPanelClose()\" (onExpanded)=\"onExpansionPanelOpen()\"\n    [collapsed]=\"collapsed\" aria-live=\"polite\" [attr.aria-hidden]=\"collapsed\">\n    <igx-expansion-panel-body>\n        <div class=\"igx-banner\">\n            <div class=\"igx-banner__message\">\n                <div *ngIf=\"bannerIcon\" class=\"igx-banner__illustration\">\n                    <ng-content select=\"igx-icon\"></ng-content>\n                </div>\n                <span class=\"igx-banner__text\">\n                    <ng-content></ng-content>\n                </span>\n            </div>\n            <div class=\"igx-banner__actions\">\n                <div class=\"igx-banner__row\">\n                    <ng-container *ngIf=\"useDefaultTemplate\">\n                        <button igxButton=\"flat\" igxRipple (click)=\"close()\">\n                            Dismiss\n                        </button>\n                    </ng-container>\n                    <ng-container *ngIf=\"!useDefaultTemplate\">\n                        <ng-content select=\"igx-banner-actions\"></ng-content>\n                    </ng-container>\n                </div>\n            </div>\n        </div>\n    </igx-expansion-panel-body>\n</igx-expansion-panel>"
                }] }
    ];
    /** @nocollapse */
    IgxBannerComponent.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    IgxBannerComponent.propDecorators = {
        _expansionPanel: [{ type: ViewChild, args: ['expansionPanel', { static: true },] }],
        _bannerActionTemplate: [{ type: ContentChild, args: [IgxBannerActionsDirective, { static: false },] }],
        bannerIcon: [{ type: ContentChild, args: [IgxIconComponent, { static: false },] }],
        onOpened: [{ type: Output }],
        onOpening: [{ type: Output }],
        onClosed: [{ type: Output }],
        onClosing: [{ type: Output }],
        animationSettings: [{ type: Input }],
        displayStyle: [{ type: HostBinding, args: ['style.display',] }]
    };
    return IgxBannerComponent;
}());
export { IgxBannerComponent };
if (false) {
    /**
     * @type {?}
     * @private
     */
    IgxBannerComponent.prototype._bannerEvent;
    /**
     * @type {?}
     * @private
     */
    IgxBannerComponent.prototype._animationSettings;
    /**
     * @type {?}
     * @private
     */
    IgxBannerComponent.prototype._expansionPanel;
    /**
     * @type {?}
     * @private
     */
    IgxBannerComponent.prototype._bannerActionTemplate;
    /**
     * @hidden
     * @type {?}
     */
    IgxBannerComponent.prototype.bannerIcon;
    /**
     * Fires after the banner shows up
     * ```typescript
     * public handleOpened(event) {
     *  ...
     * }
     * ```
     * ```html
     * <igx-banner (onOpened)="handleOpened($event)"></igx-banner>
     * ```
     * @type {?}
     */
    IgxBannerComponent.prototype.onOpened;
    /**
     * Fires before the banner shows up
     * ```typescript
     * public handleOpening(event) {
     *  ...
     * }
     * ```
     * ```html
     * <igx-banner (onOpening)="handleOpening($event)"></igx-banner>
     * ```
     * @type {?}
     */
    IgxBannerComponent.prototype.onOpening;
    /**
     * Fires after the banner hides
     * ```typescript
     * public handleClosed(event) {
     *  ...
     * }
     * ```
     * ```html
     * <igx-banner (onClosed)="handleClosed($event)"></igx-banner>
     * ```
     * @type {?}
     */
    IgxBannerComponent.prototype.onClosed;
    /**
     * Fires before the banner hides
     * ```typescript
     * public handleClosing(event) {
     *  ...
     * }
     * ```
     * ```html
     * <igx-banner (onClosing)="handleClosing($event)"></igx-banner>
     * ```
     * @type {?}
     */
    IgxBannerComponent.prototype.onClosing;
    /** @type {?} */
    IgxBannerComponent.prototype.elementRef;
}
/**
 * @hidden
 */
var IgxBannerModule = /** @class */ (function () {
    function IgxBannerModule() {
    }
    IgxBannerModule.decorators = [
        { type: NgModule, args: [{
                    declarations: [IgxBannerComponent, IgxBannerActionsDirective],
                    exports: [IgxBannerComponent, IgxBannerActionsDirective],
                    imports: [CommonModule, IgxExpansionPanelModule, IgxIconModule, IgxButtonModule, IgxRippleModule]
                },] }
    ];
    return IgxBannerModule;
}());
export { IgxBannerModule };
//# sourceMappingURL=data:application/json;base64, 