/**
 * al-form-group
 *
 * @author Rob Parker <robert.parker@alertlogic.com>
 *
 * @copyright Alert Logic, Inc 2021
 *
 */
import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../al-label/al-label.component";
import * as i3 from "../al-tip/al-tip.component";
import * as i4 from "../al-hint/al-hint.component";
function AlFormGroupComponent_al2_label_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "al2-label", 6);
} if (rf & 2) {
    var ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("label", ctx_r0.label)("for", ctx_r0.id);
} }
function AlFormGroupComponent_al2_tip_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "al2-tip", 7);
} if (rf & 2) {
    var ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("tip", ctx_r1.tip);
} }
function AlFormGroupComponent_span_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 8);
    i0.ɵɵtext(1, "(Required)");
    i0.ɵɵelementEnd();
} }
function AlFormGroupComponent_al2_hint_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "al2-hint", 9);
} if (rf & 2) {
    var ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵproperty("hint", ctx_r3.hint);
} }
var _c0 = function (a0) { return { "ald-form-group--spaced": a0 }; };
var _c1 = ["*"];
var AlFormGroupComponent = /** @class */ (function () {
    function AlFormGroupComponent() {
        this.label = '';
        this.verticalSpace = true;
        this.required = false;
    }
    AlFormGroupComponent.prototype.ngOnInit = function () {
        this.id = this.id || this.label;
    };
    /** @nocollapse */ AlFormGroupComponent.ɵfac = function AlFormGroupComponent_Factory(t) { return new (t || AlFormGroupComponent)(); };
    /** @nocollapse */ AlFormGroupComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlFormGroupComponent, selectors: [["al2-form-group"]], inputs: { label: "label", verticalSpace: "verticalSpace", id: "id", hint: "hint", tip: "tip", required: "required" }, ngContentSelectors: _c1, decls: 7, vars: 9, consts: [[1, "ald-form-group", 3, "ngClass"], [1, "ald-form-group__header"], [3, "label", "for", 4, "ngIf"], [3, "tip", 4, "ngIf"], ["class", "ald-form-mark", 4, "ngIf"], [3, "hint", 4, "ngIf"], [3, "label", "for"], [3, "tip"], [1, "ald-form-mark"], [3, "hint"]], template: function AlFormGroupComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵprojectionDef();
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵelementStart(1, "div", 1);
            i0.ɵɵtemplate(2, AlFormGroupComponent_al2_label_2_Template, 1, 2, "al2-label", 2);
            i0.ɵɵtemplate(3, AlFormGroupComponent_al2_tip_3_Template, 1, 1, "al2-tip", 3);
            i0.ɵɵtemplate(4, AlFormGroupComponent_span_4_Template, 2, 0, "span", 4);
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(5, AlFormGroupComponent_al2_hint_5_Template, 1, 1, "al2-hint", 5);
            i0.ɵɵprojection(6);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0, ctx.verticalSpace));
            i0.ɵɵadvance(1);
            i0.ɵɵclassProp("ald-form-group__header--multicol", ctx.tip || ctx.required);
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", ctx.label);
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", ctx.tip);
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", ctx.required);
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", ctx.hint);
        } }, directives: [i1.NgClass, i1.NgIf, i2.AlLabelComponent, i3.AlTipComponent, i4.AlHintComponent], encapsulation: 2 });
    return AlFormGroupComponent;
}());
export { AlFormGroupComponent };
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AlFormGroupComponent, [{
        type: Component,
        args: [{
                selector: 'al2-form-group',
                templateUrl: './al-form-group.component.html'
            }]
    }], function () { return []; }, { label: [{
            type: Input
        }], verticalSpace: [{
            type: Input
        }], id: [{
            type: Input
        }], hint: [{
            type: Input
        }], tip: [{
            type: Input
        }], required: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWwtZm9ybS1ncm91cC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AYWwvbmctZ2VuZXJpYy1jb21wb25lbnRzLyIsInNvdXJjZXMiOlsibmV3LWNvbXBvbmVudHMvYWwtZm9ybS1ncm91cC9hbC1mb3JtLWdyb3VwLmNvbXBvbmVudC50cyIsIm5ldy1jb21wb25lbnRzL2FsLWZvcm0tZ3JvdXAvYWwtZm9ybS1ncm91cC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7OztHQU9HO0FBQ0gsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQVMsTUFBTSxlQUFlLENBQUM7Ozs7Ozs7SUNMdEQsK0JBQWdFOzs7SUFBdkMsb0NBQWUsa0JBQUE7OztJQUN4Qyw2QkFBMkM7OztJQUF0QixnQ0FBVzs7O0lBQzFCLCtCQUE2QztJQUFBLDBCQUFVO0lBQUEsaUJBQU87OztJQUdyRSw4QkFBZ0Q7OztJQUF6QixrQ0FBYTs7OztBREdyQztJQWFJO1FBUFMsVUFBSyxHQUFXLEVBQUUsQ0FBQztRQUNuQixrQkFBYSxHQUFhLElBQUksQ0FBQztRQUkvQixhQUFRLEdBQUksS0FBSyxDQUFDO0lBRVgsQ0FBQztJQUVqQix1Q0FBUSxHQUFSO1FBQ0ksSUFBSSxDQUFDLEVBQUUsR0FBRyxJQUFJLENBQUMsRUFBRSxJQUFJLElBQUksQ0FBQyxLQUFLLENBQUM7SUFDcEMsQ0FBQzsrR0FiUSxvQkFBb0I7Z0ZBQXBCLG9CQUFvQjs7WUNmakMsOEJBRUM7WUFBQSw4QkF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