import { Component } from '@angular/core';
import { FieldType } from '@ngx-formly/core';
import { gettext } from '@c8y/ngx-components';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@c8y/ngx-components";
import * as i3 from "@ngx-formly/core";
export class Lwm2mInputGroupAddonType extends FieldType {
    ngOnInit() {
        this.props.addonLabel = this.props?.addonLabel || gettext('undefined');
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Lwm2mInputGroupAddonType, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: Lwm2mInputGroupAddonType, selector: "c8y-lwm2m-input-group-addon", usesInheritance: true, ngImport: i0, template: "<div class=\"input-group\">\n  <span class=\"input-group-addon\">{{ props?.addonLabel }}</span>\n  <input\n    class=\"form-control\"\n    [class.is-invalid]=\"showError\"\n    [type]=\"'text'\"\n    [formControl]=\"formControl\"\n    [formlyAttributes]=\"field\"\n    [required]=\"props.required\"\n    [disabled]=\"props.disabled\"\n  />\n</div>\n", dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Lwm2mInputGroupAddonType, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-lwm2m-input-group-addon', template: "<div class=\"input-group\">\n  <span class=\"input-group-addon\">{{ props?.addonLabel }}</span>\n  <input\n    class=\"form-control\"\n    [class.is-invalid]=\"showError\"\n    [type]=\"'text'\"\n    [formControl]=\"formControl\"\n    [formlyAttributes]=\"field\"\n    [required]=\"props.required\"\n    [disabled]=\"props.disabled\"\n  />\n</div>\n" }]
        }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibHdtMm0taW5wdXQtZ3JvdXAtYWRkb24udHlwZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm90b2NvbC1sd20ybS9mb3JtbHkvbHdtMm0taW5wdXQtZ3JvdXAtYWRkb24udHlwZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9wcm90b2NvbC1sd20ybS9mb3JtbHkvbHdtMm0taW5wdXQtZ3JvdXAtYWRkb24udHlwZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFVLE1BQU0sZUFBZSxDQUFDO0FBQ2xELE9BQU8sRUFBRSxTQUFTLEVBQW1CLE1BQU0sa0JBQWtCLENBQUM7QUFDOUQsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLHFCQUFxQixDQUFDOzs7OztBQU05QyxNQUFNLE9BQU8sd0JBQXlCLFNBQVEsU0FBMEI7SUFDdEUsUUFBUTtRQUNOLElBQUksQ0FBQyxLQUFLLENBQUMsVUFBVSxHQUFHLElBQUksQ0FBQyxLQUFLLEVBQUUsVUFBVSxJQUFJLE9BQU8sQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUN6RSxDQUFDO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