import { Component, importProvidersFrom } from '@angular/core';
import { FieldType, FormlyModule } from '@ngx-formly/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ngx-formly/core";
import * as i3 from "../../common/humanize.pipe";
export const objectTypeConfig = () => importProvidersFrom(FormlyModule.forChild({
    types: [{ name: 'object', component: ObjectTypeComponent }]
}));
export class ObjectTypeComponent extends FieldType {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ObjectTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: ObjectTypeComponent, selector: "c8y-object-type", usesInheritance: true, ngImport: i0, template: "<div role=\"group\" [attr.aria-labelledby]=\"id + '-fieldset'\">\n  <p *ngIf=\"to.label\" class=\"text-medium\" id=\"{{ id + '-fieldset' }}\">\n    {{ to.label | humanize }}\n  </p>\n  <p *ngIf=\"to.description\" class=\"m-b-8 small\">\n    {{ to.description }}\n  </p>\n  <div\n    class=\"form-control-feedback-message has-error\"\n    role=\"alert\"\n    *ngIf=\"showError && formControl.errors\"\n  >\n    <formly-validation-message [field]=\"field\"></formly-validation-message>\n  </div>\n  <formly-field *ngFor=\"let f of field.fieldGroup\" [field]=\"f\"></formly-field>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "component", type: i2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "pipe", type: i3.HumanizePipe, name: "humanize" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ObjectTypeComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-object-type', template: "<div role=\"group\" [attr.aria-labelledby]=\"id + '-fieldset'\">\n  <p *ngIf=\"to.label\" class=\"text-medium\" id=\"{{ id + '-fieldset' }}\">\n    {{ to.label | humanize }}\n  </p>\n  <p *ngIf=\"to.description\" class=\"m-b-8 small\">\n    {{ to.description }}\n  </p>\n  <div\n    class=\"form-control-feedback-message has-error\"\n    role=\"alert\"\n    *ngIf=\"showError && formControl.errors\"\n  >\n    <formly-validation-message [field]=\"field\"></formly-validation-message>\n  </div>\n  <formly-field *ngFor=\"let f of field.fieldGroup\" [field]=\"f\"></formly-field>\n</div>\n" }]
        }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2JqZWN0LnR5cGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vY29yZS9keW5hbWljLWZvcm1zL29iamVjdC9vYmplY3QudHlwZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9jb3JlL2R5bmFtaWMtZm9ybXMvb2JqZWN0L29iamVjdC50eXBlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQXdCLG1CQUFtQixFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3JGLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7Ozs7O0FBRTNELE1BQU0sQ0FBQyxNQUFNLGdCQUFnQixHQUFHLEdBQXlCLEVBQUUsQ0FDekQsbUJBQW1CLENBQ2pCLFlBQVksQ0FBQyxRQUFRLENBQUM7SUFDcEIsS0FBSyxFQUFFLENBQUMsRUFBRSxJQUFJLEVBQUUsUUFBUSxFQUFFLFNBQVMsRUFBRSxtQkFBbUIsRUFBRSxDQUFDO0NBQzVELENBQUMs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