import { Directive, HostListener, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "./nav.service";
/**
 * Directive that can toggle targets through provided NavigationService.
 *
 * Usage:
 * ```
 * <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);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.4", ngImport: i0, type: IgxNavigationToggleDirective, deps: [{ token: i1.IgxNavigationService }], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-rc.4", type: IgxNavigationToggleDirective, isStandalone: true, selector: "[igxNavToggle]", inputs: { target: ["igxNavToggle", "target"] }, host: { listeners: { "click": "toggleNavigationDrawer()" } }, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.4", ngImport: i0, type: IgxNavigationToggleDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[igxNavToggle]',
                    standalone: true
                }]
        }], 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 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);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.4", ngImport: i0, type: IgxNavigationCloseDirective, deps: [{ token: i1.IgxNavigationService }], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-rc.4", type: IgxNavigationCloseDirective, isStandalone: true, selector: "[igxNavClose]", inputs: { target: ["igxNavClose", "target"] }, host: { listeners: { "click": "closeNavigationDrawer()" } }, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.4", ngImport: i0, type: IgxNavigationCloseDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[igxNavClose]',
                    standalone: true
                }]
        }], ctorParameters: function () { return [{ type: i1.IgxNavigationService }]; }, propDecorators: { target: [{
                type: Input,
                args: ['igxNavClose']
            }], closeNavigationDrawer: [{
                type: HostListener,
                args: ['click']
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlyZWN0aXZlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2lnbml0ZXVpLWFuZ3VsYXIvc3JjL2xpYi9jb3JlL25hdmlnYXRpb24vZGlyZWN0aXZlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7OztBQUcvRDs7Ozs7Ozs7R0FRRztBQUtILE1BQU0sT0FBTyw0QkFBNEI7SUFLckMsWUFBWSxHQUF5QjtRQUNqQyxJQUFJLENBQUMsS0FBSyxHQUFHLEdBQUcsQ0FBQztJQUNyQixDQUFDO0lBR00sc0JBQXNCO1FBQ3pCLElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUUsSUFBSSxDQUFDLENBQUM7SUFDekMsQ0FBQzttSEFaUSw0QkFBNEI7dUdBQTVCLDRCQUE0Qjs7Z0dBQTVCLDRCQUE0Qj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