/**
 * 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) {
    const 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) {
    const 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) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵproperty("hint", ctx_r3.hint);
} }
const _c0 = function (a0) { return { "ald-form-group--spaced": a0 }; };
const _c1 = ["*"];
export class AlFormGroupComponent {
    constructor() {
        this.label = '';
        this.verticalSpace = true;
        this.required = false;
    }
    ngOnInit() {
        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 });
/*@__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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWwtZm9ybS1ncm91cC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AYWwvbmctZ2VuZXJpYy1jb21wb25lbnRzLyIsInNvdXJjZXMiOlsibmV3LWNvbXBvbmVudHMvYWwtZm9ybS1ncm91cC9hbC1mb3JtLWdyb3VwLmNvbXBvbmVudC50cyIsIm5ldy1jb21wb25lbnRzL2FsLWZvcm0tZ3JvdXAvYWwtZm9ybS1ncm91cC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7OztHQU9HO0FBQ0gsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQVMsTUFBTSxlQUFlLENBQUM7Ozs7Ozs7SUNMdEQsK0JBQWdFOzs7SUFBdkMsb0NBQWUsa0JBQUE7OztJQUN4Qyw2QkFBMkM7OztJQUF0QixnQ0FBVzs7O0lBQzFCLCtCQUE2QztJQUFBLDBCQUFVO0lBQUEsaUJBQU87OztJQUdyRSw4QkFBZ0Q7OztJQUF6QixrQ0FBYTs7OztBRE9yQyxNQUFNLE9BQU8sb0JBQW9CO0lBUzdCO1FBUFMsVUFBSyxHQUFXLEVBQUUsQ0FBQztRQUNuQixrQkFBYSxHQUFhLElBQUksQ0FBQztRQUkvQixhQUFRLEdBQUksS0FBSyxDQUFDO0lBRVgsQ0FBQztJQUVqQixRQUFRO1FBQ0osSUFBSSxDQUFDLEVBQUUsR0FBRyxJQUFJLENBQUMsRUFBRSxJQUFJLElBQUksQ0FBQyxLQUFLLENBQUM7SUFDcEMsQ0FBQzs7MkdBYlEsb0JBQW9COzRFQUFwQixvQkFBb0I7O1FDZmpDLDhCQUVDO1FBQUEsOEJBQ0M7UUFBQSxpRkFBb0Q7UUFDcEQsNkVBQWlDO1FBQzNCLHVFQ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