import { Directive, EventEmitter, Input } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import * as i0 from "@angular/core";
export class TabPanelDirective {
    constructor(elementRef, destroyRef, renderer) {
        this.elementRef = elementRef;
        this.destroyRef = destroyRef;
        this.renderer = renderer;
        this.ctTabPanel = '';
        this.hide = new EventEmitter();
        this.hide.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(hide => {
            this.renderer.addClass(this.elementRef.nativeElement, hide ? 'hidden' : 'flex');
            this.renderer.removeClass(this.elementRef.nativeElement, hide ? 'flex' : 'hidden');
        });
    }
    ngOnInit() {
        this.hide.next(true);
    }
    show() {
        this.renderer.addClass(this.elementRef.nativeElement, 'flex');
        this.renderer.removeClass(this.elementRef.nativeElement, 'hidden');
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TabPanelDirective, deps: [{ token: i0.ElementRef }, { token: i0.DestroyRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: TabPanelDirective, isStandalone: true, selector: "[ctTabPanel]", inputs: { ctTabPanel: "ctTabPanel", hide: "hide" }, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TabPanelDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[ctTabPanel]',
                    standalone: true,
                }]
        }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.DestroyRef }, { type: i0.Renderer2 }], propDecorators: { ctTabPanel: [{
                type: Input
            }], hide: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFiLXBhbmVsLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3R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