import { Directive, HostListener, Input, NgModule } from '@angular/core';
import { IgxNavigationService } from './nav.service';
import * as i0 from "@angular/core";
import * as i1 from "./nav.service";
/**
 * Directive that can toggle targets through provided NavigationService.
 *
 * Usage:
 * ```
 * <button type="button" igxNavToggle="ID">Toggle</button>
 * ```
 * Where the `ID` matches the ID of compatible `IToggleView` component.
 */
export class IgxNavigationToggleDirective {
    constructor(nav) {
        this.state = nav;
    }
    toggleNavigationDrawer() {
        this.state.toggle(this.target, true);
    }
}
IgxNavigationToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgxNavigationToggleDirective, deps: [{ token: i1.IgxNavigationService }], target: i0.ɵɵFactoryTarget.Directive });
IgxNavigationToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: IgxNavigationToggleDirective, selector: "[igxNavToggle]", inputs: { target: ["igxNavToggle", "target"] }, host: { listeners: { "click": "toggleNavigationDrawer()" } }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgxNavigationToggleDirective, decorators: [{
            type: Directive,
            args: [{ selector: '[igxNavToggle]' }]
        }], ctorParameters: function () { return [{ type: i1.IgxNavigationService }]; }, propDecorators: { target: [{
                type: Input,
                args: ['igxNavToggle']
            }], toggleNavigationDrawer: [{
                type: HostListener,
                args: ['click']
            }] } });
/**
 * Directive that can close targets through provided NavigationService.
 *
 * Usage:
 * ```
 * <button type="button" igxNavClose="ID">Close</button>
 * ```
 * Where the `ID` matches the ID of compatible `IToggleView` component.
 */
export class IgxNavigationCloseDirective {
    constructor(nav) {
        this.state = nav;
    }
    closeNavigationDrawer() {
        this.state.close(this.target, true);
    }
}
IgxNavigationCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgxNavigationCloseDirective, deps: [{ token: i1.IgxNavigationService }], target: i0.ɵɵFactoryTarget.Directive });
IgxNavigationCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: IgxNavigationCloseDirective, selector: "[igxNavClose]", inputs: { target: ["igxNavClose", "target"] }, host: { listeners: { "click": "closeNavigationDrawer()" } }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgxNavigationCloseDirective, decorators: [{
            type: Directive,
            args: [{ selector: '[igxNavClose]' }]
        }], ctorParameters: function () { return [{ type: i1.IgxNavigationService }]; }, propDecorators: { target: [{
                type: Input,
                args: ['igxNavClose']
            }], closeNavigationDrawer: [{
                type: HostListener,
                args: ['click']
            }] } });
/**
 * @hidden
 */
export class IgxNavigationModule {
}
IgxNavigationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgxNavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
IgxNavigationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: IgxNavigationModule, declarations: [IgxNavigationCloseDirective, IgxNavigationToggleDirective], exports: [IgxNavigationCloseDirective, IgxNavigationToggleDirective] });
IgxNavigationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgxNavigationModule, providers: [IgxNavigationService] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgxNavigationModule, decorators: [{
            type: NgModule,
            args: [{
                    declarations: [IgxNavigationCloseDirective, IgxNavigationToggleDirective],
                    exports: [IgxNavigationCloseDirective, IgxNavigationToggleDirective],
                    providers: [IgxNavigationService]
                }]
        }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlyZWN0aXZlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpb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