import * as i0 from '@angular/core';
import { Directive, HostBinding, Input, HostListener, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

class BsForDirective {
    constructor() {
        this.defaultCursor = true;
    }
    onMouseClick() {
        if (!('tagName' in this.bsFor)) {
            this.bsFor.focus();
        }
        else if (this.bsFor.tagName.toLowerCase() !== 'input') {
            this.bsFor.focus();
        }
        else if (this.bsFor.type.toLowerCase() === 'file') {
            this.bsFor.click();
        }
        else {
            this.bsFor.focus();
        }
    }
}
BsForDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BsForDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
BsForDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: BsForDirective, selector: "[bsFor]", inputs: { bsFor: "bsFor" }, host: { listeners: { "click": "onMouseClick()" }, properties: { "class.cursor-default": "this.defaultCursor" } }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BsForDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[bsFor]'
                }]
        }], propDecorators: { defaultCursor: [{
                type: HostBinding,
                args: ['class.cursor-default']
            }], bsFor: [{
                type: Input
            }], onMouseClick: [{
                type: HostListener,
                args: ['click']
            }] } });

class BsForModule {
}
BsForModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BsForModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
BsForModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: BsForModule, declarations: [BsForDirective], imports: [CommonModule], exports: [BsForDirective] });
BsForModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BsForModule, imports: [CommonModule] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BsForModule, decorators: [{
            type: NgModule,
            args: [{
                    declarations: [
                        BsForDirective
                    ],
                    imports: [
                        CommonModule
                    ],
                    exports: [
                        BsForDirective
                    ]
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { BsForDirective, BsForModule };
//# sourceMappingURL=mintplayer-ng-bootstrap-for.mjs.map
