import * as i0 from '@angular/core';
import { input, Component, makeEnvironmentProviders, APP_INITIALIZER } from '@angular/core';
import { FieldLabelComponent, DynamicFormRegistry } from '@seniorsistemas/angular-components/dynamic-form';
import * as i2 from '@angular/forms';
import { ReactiveFormsModule } from '@angular/forms';
import * as i1 from 'primeng/editor';
import { EditorModule } from 'primeng/editor';

class EditorFieldComponent {
    field = input.required();
    formControl = input.required();
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: EditorFieldComponent, isStandalone: true, selector: "ng-component", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let _field = field();\n<s-field-label [field]=\"_field\"></s-field-label>\n\n<p-editor\n    [formControl]=\"formControl()\"\n    [formats]=\"_field.formats\"\n    [readonly]=\"_field.readonly ? _field.readonly : false\"\n    [modules]=\"_field.modules\"\n    [style]=\"_field.style\"\n>\n</p-editor>\n\n", dependencies: [{ kind: "ngmodule", type: EditorModule }, { kind: "component", type: i1.Editor, selector: "p-editor", inputs: ["style", "styleClass", "placeholder", "formats", "modules", "bounds", "scrollingContainer", "debug", "readonly"], outputs: ["onInit", "onTextChange", "onSelectionChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FieldLabelComponent, selector: "s-field-label", inputs: ["field", "fieldContainerRef"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorFieldComponent, decorators: [{
            type: Component,
            args: [{ standalone: true, imports: [EditorModule, ReactiveFormsModule, FieldLabelComponent], template: "@let _field = field();\n<s-field-label [field]=\"_field\"></s-field-label>\n\n<p-editor\n    [formControl]=\"formControl()\"\n    [formats]=\"_field.formats\"\n    [readonly]=\"_field.readonly ? _field.readonly : false\"\n    [modules]=\"_field.modules\"\n    [style]=\"_field.style\"\n>\n</p-editor>\n\n" }]
        }] });

function provideEditorField() {
    return makeEnvironmentProviders([
        {
            provide: APP_INITIALIZER,
            useFactory: () => {
                return () => {
                    DynamicFormRegistry.registerField(EditorFieldComponent, 'editor');
                };
            },
            multi: true,
        },
    ]);
}

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

export { provideEditorField };
//# sourceMappingURL=seniorsistemas-angular-components-optional-fields-editor.mjs.map
