import * as i0 from '@angular/core';
import { Directive, Input, HostBinding, NgModule } from '@angular/core';
import { isNotNil } from '@angular-ru/cdk/utils';

class AbstractFlexLayoutDirective {
    get classList() {
        return this.el.nativeElement.classList;
    }
}
/** @nocollapse */ /** @nocollapse */ AbstractFlexLayoutDirective.ɵfac = function AbstractFlexLayoutDirective_Factory(t) { return new (t || AbstractFlexLayoutDirective)(); };
/** @nocollapse */ /** @nocollapse */ AbstractFlexLayoutDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: AbstractFlexLayoutDirective });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AbstractFlexLayoutDirective, [{
        type: Directive
    }], null, null); })();

class FlexBottomIndentDirective extends AbstractFlexLayoutDirective {
    constructor(el) {
        super();
        this.el = el;
        this.bottomIndent = null;
    }
    ngAfterViewInit() {
        this.classList.add(`flex-bottom-indent`);
    }
}
/** @nocollapse */ /** @nocollapse */ FlexBottomIndentDirective.ɵfac = function FlexBottomIndentDirective_Factory(t) { return new (t || FlexBottomIndentDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
/** @nocollapse */ /** @nocollapse */ FlexBottomIndentDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: FlexBottomIndentDirective, selectors: [["", "flex-bottom-indent", ""]], hostVars: 2, hostBindings: function FlexBottomIndentDirective_HostBindings(rf, ctx) { if (rf & 2) {
        i0.ɵɵstyleProp("margin-bottom", ctx.bottomIndent, "px");
    } }, inputs: { bottomIndent: ["flex-bottom-indent", "bottomIndent"] }, features: [i0.ɵɵInheritDefinitionFeature] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlexBottomIndentDirective, [{
        type: Directive,
        args: [{ selector: '[flex-bottom-indent]' }]
    }], function () { return [{ type: i0.ElementRef }]; }, { bottomIndent: [{
            type: Input,
            args: ['flex-bottom-indent']
        }, {
            type: HostBinding,
            args: ['style.margin-bottom.px']
        }] }); })();

class FlexColumnDirective extends AbstractFlexLayoutDirective {
    constructor(el) {
        super();
        this.el = el;
        // eslint-disable-next-line @angular-eslint/no-input-rename
        this.flexDirection = null;
    }
    ngAfterViewInit() {
        if (isNotNil(this.flexDirection)) {
            this.el.nativeElement.style.flexDirection = this.flexDirection;
        }
        this.classList.add(`flex-column`);
    }
}
/** @nocollapse */ /** @nocollapse */ FlexColumnDirective.ɵfac = function FlexColumnDirective_Factory(t) { return new (t || FlexColumnDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
/** @nocollapse */ /** @nocollapse */ FlexColumnDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: FlexColumnDirective, selectors: [["", "flex-column", ""]], inputs: { flexDirection: ["flex-direction", "flexDirection"] }, features: [i0.ɵɵInheritDefinitionFeature] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlexColumnDirective, [{
        type: Directive,
        args: [{ selector: '[flex-column]' }]
    }], function () { return [{ type: i0.ElementRef }]; }, { flexDirection: [{
            type: Input,
            args: ['flex-direction']
        }] }); })();

/* eslint-disable @angular-eslint/no-input-rename */
class FlexContainerDirective extends AbstractFlexLayoutDirective {
    constructor(el) {
        super();
        this.el = el;
        this.center = false;
        this.noWrap = false;
        this.fullWidth = false;
    }
    ngAfterViewInit() {
        this.classList.add(`flex-container`);
        if (this.center !== false) {
            this.classList.add(`flex-container--center`);
        }
        if (this.noWrap !== false) {
            this.classList.add(`flex-container__nowrap`);
        }
        if (this.fullWidth !== false) {
            this.classList.add(`flex-container__full-width`);
        }
    }
}
/** @nocollapse */ /** @nocollapse */ FlexContainerDirective.ɵfac = function FlexContainerDirective_Factory(t) { return new (t || FlexContainerDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
/** @nocollapse */ /** @nocollapse */ FlexContainerDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: FlexContainerDirective, selectors: [["", "flex-container", ""]], inputs: { center: ["flex-center", "center"], noWrap: ["no-wrap", "noWrap"], fullWidth: ["full-width", "fullWidth"] }, features: [i0.ɵɵInheritDefinitionFeature] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlexContainerDirective, [{
        type: Directive,
        args: [{ selector: '[flex-container]' }]
    }], function () { return [{ type: i0.ElementRef }]; }, { center: [{
            type: Input,
            args: ['flex-center']
        }], noWrap: [{
            type: Input,
            args: ['no-wrap']
        }], fullWidth: [{
            type: Input,
            args: ['full-width']
        }] }); })();

class FlexEndDirective extends AbstractFlexLayoutDirective {
    constructor(el) {
        super();
        this.el = el;
    }
    ngAfterViewInit() {
        this.classList.add(`flex-end`);
    }
}
/** @nocollapse */ /** @nocollapse */ FlexEndDirective.ɵfac = function FlexEndDirective_Factory(t) { return new (t || FlexEndDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
/** @nocollapse */ /** @nocollapse */ FlexEndDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: FlexEndDirective, selectors: [["", "flex-end", ""]], features: [i0.ɵɵInheritDefinitionFeature] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlexEndDirective, [{
        type: Directive,
        args: [{ selector: '[flex-end]' }]
    }], function () { return [{ type: i0.ElementRef }]; }, null); })();

class FlexFullWidthDirective extends AbstractFlexLayoutDirective {
    constructor(el) {
        super();
        this.el = el;
    }
    ngAfterViewInit() {
        this.classList.add(`flex__full-width`);
    }
}
/** @nocollapse */ /** @nocollapse */ FlexFullWidthDirective.ɵfac = function FlexFullWidthDirective_Factory(t) { return new (t || FlexFullWidthDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
/** @nocollapse */ /** @nocollapse */ FlexFullWidthDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: FlexFullWidthDirective, selectors: [["", "flex-full-width", ""]], features: [i0.ɵɵInheritDefinitionFeature] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlexFullWidthDirective, [{
        type: Directive,
        args: [{ selector: '[flex-full-width]' }]
    }], function () { return [{ type: i0.ElementRef }]; }, null); })();

class FlexInlineDirective extends AbstractFlexLayoutDirective {
    constructor(el) {
        super();
        this.el = el;
    }
    ngAfterViewInit() {
        this.classList.add(`flex-inline`);
    }
}
/** @nocollapse */ /** @nocollapse */ FlexInlineDirective.ɵfac = function FlexInlineDirective_Factory(t) { return new (t || FlexInlineDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
/** @nocollapse */ /** @nocollapse */ FlexInlineDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: FlexInlineDirective, selectors: [["", "flex-inline", ""]], features: [i0.ɵɵInheritDefinitionFeature] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlexInlineDirective, [{
        type: Directive,
        args: [{ selector: '[flex-inline]' }]
    }], function () { return [{ type: i0.ElementRef }]; }, null); })();

/* eslint-disable @angular-eslint/no-input-rename */
class FlexItemDirective extends AbstractFlexLayoutDirective {
    constructor(el) {
        super();
        this.el = el;
        this.wide = false;
        this.equalWidth = false;
    }
    ngAfterViewInit() {
        this.classList.add(`flex__item`);
        if (this.wide !== false) {
            this.classList.add(`flex__item--wide`);
        }
        if (this.equalWidth !== false) {
            this.classList.add(`flex__item--equal-width`);
        }
    }
}
/** @nocollapse */ /** @nocollapse */ FlexItemDirective.ɵfac = function FlexItemDirective_Factory(t) { return new (t || FlexItemDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
/** @nocollapse */ /** @nocollapse */ FlexItemDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: FlexItemDirective, selectors: [["", "flex-item", ""]], inputs: { wide: ["flex-wide", "wide"], equalWidth: ["flex-equal", "equalWidth"] }, features: [i0.ɵɵInheritDefinitionFeature] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlexItemDirective, [{
        type: Directive,
        args: [{ selector: '[flex-item]' }]
    }], function () { return [{ type: i0.ElementRef }]; }, { wide: [{
            type: Input,
            args: ['flex-wide']
        }], equalWidth: [{
            type: Input,
            args: ['flex-equal']
        }] }); })();

class FlexJustifyNormalDirective extends AbstractFlexLayoutDirective {
    constructor(el) {
        super();
        this.el = el;
    }
    ngAfterViewInit() {
        this.classList.add(`flex-justify-normal`);
    }
}
/** @nocollapse */ /** @nocollapse */ FlexJustifyNormalDirective.ɵfac = function FlexJustifyNormalDirective_Factory(t) { return new (t || FlexJustifyNormalDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
/** @nocollapse */ /** @nocollapse */ FlexJustifyNormalDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: FlexJustifyNormalDirective, selectors: [["", "flex-justify-normal", ""]], features: [i0.ɵɵInheritDefinitionFeature] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlexJustifyNormalDirective, [{
        type: Directive,
        args: [{ selector: '[flex-justify-normal]' }]
    }], function () { return [{ type: i0.ElementRef }]; }, null); })();

class FlexNoneDirective extends AbstractFlexLayoutDirective {
    constructor(el) {
        super();
        this.el = el;
    }
    ngAfterViewInit() {
        this.classList.add(`flex-none`);
    }
}
/** @nocollapse */ /** @nocollapse */ FlexNoneDirective.ɵfac = function FlexNoneDirective_Factory(t) { return new (t || FlexNoneDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
/** @nocollapse */ /** @nocollapse */ FlexNoneDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: FlexNoneDirective, selectors: [["", "flex-none", ""]], features: [i0.ɵɵInheritDefinitionFeature] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlexNoneDirective, [{
        type: Directive,
        args: [{ selector: '[flex-none]' }]
    }], function () { return [{ type: i0.ElementRef }]; }, null); })();

class FlexSpaceBetweenDirective extends AbstractFlexLayoutDirective {
    constructor(el) {
        super();
        this.el = el;
    }
    ngAfterViewInit() {
        this.classList.add(`flex-space-between`);
    }
}
/** @nocollapse */ /** @nocollapse */ FlexSpaceBetweenDirective.ɵfac = function FlexSpaceBetweenDirective_Factory(t) { return new (t || FlexSpaceBetweenDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
/** @nocollapse */ /** @nocollapse */ FlexSpaceBetweenDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: FlexSpaceBetweenDirective, selectors: [["", "flex-space-between", ""]], features: [i0.ɵɵInheritDefinitionFeature] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlexSpaceBetweenDirective, [{
        type: Directive,
        args: [{ selector: '[flex-space-between]' }]
    }], function () { return [{ type: i0.ElementRef }]; }, null); })();

class FlexStartDirective extends AbstractFlexLayoutDirective {
    constructor(el) {
        super();
        this.el = el;
    }
    ngAfterViewInit() {
        this.classList.add(`flex-start`);
    }
}
/** @nocollapse */ /** @nocollapse */ FlexStartDirective.ɵfac = function FlexStartDirective_Factory(t) { return new (t || FlexStartDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
/** @nocollapse */ /** @nocollapse */ FlexStartDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: FlexStartDirective, selectors: [["", "flex-start", ""]], features: [i0.ɵɵInheritDefinitionFeature] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlexStartDirective, [{
        type: Directive,
        args: [{ selector: '[flex-start]' }]
    }], function () { return [{ type: i0.ElementRef }]; }, null); })();

const DECLARATIONS = [
    FlexContainerDirective,
    FlexNoneDirective,
    FlexColumnDirective,
    FlexItemDirective,
    FlexEndDirective,
    FlexStartDirective,
    FlexInlineDirective,
    FlexFullWidthDirective,
    FlexJustifyNormalDirective,
    FlexSpaceBetweenDirective,
    FlexBottomIndentDirective
];
class FlexLayoutModule {
}
/** @nocollapse */ /** @nocollapse */ FlexLayoutModule.ɵfac = function FlexLayoutModule_Factory(t) { return new (t || FlexLayoutModule)(); };
/** @nocollapse */ /** @nocollapse */ FlexLayoutModule.ɵmod = /** @pureOrBreakMyCode */ i0.ɵɵdefineNgModule({ type: FlexLayoutModule });
/** @nocollapse */ /** @nocollapse */ FlexLayoutModule.ɵinj = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjector({});
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlexLayoutModule, [{
        type: NgModule,
        args: [{
                declarations: DECLARATIONS,
                exports: DECLARATIONS
            }]
    }], null, null); })();
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(FlexLayoutModule, { declarations: [FlexContainerDirective,
        FlexNoneDirective,
        FlexColumnDirective,
        FlexItemDirective,
        FlexEndDirective,
        FlexStartDirective,
        FlexInlineDirective,
        FlexFullWidthDirective,
        FlexJustifyNormalDirective,
        FlexSpaceBetweenDirective,
        FlexBottomIndentDirective], exports: [FlexContainerDirective,
        FlexNoneDirective,
        FlexColumnDirective,
        FlexItemDirective,
        FlexEndDirective,
        FlexStartDirective,
        FlexInlineDirective,
        FlexFullWidthDirective,
        FlexJustifyNormalDirective,
        FlexSpaceBetweenDirective,
        FlexBottomIndentDirective] }); })();

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

export { FlexBottomIndentDirective, FlexColumnDirective, FlexContainerDirective, FlexEndDirective, FlexFullWidthDirective, FlexInlineDirective, FlexItemDirective, FlexJustifyNormalDirective, FlexLayoutModule, FlexNoneDirective, FlexSpaceBetweenDirective, FlexStartDirective };
//# sourceMappingURL=angular-ru-cdk-flex-layout.js.map
