import { Component, input } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { FieldLabelComponent } from '../../../components/field-label/field-label.component';
import { ContentGeneratorModule } from '@seniorsistemas/angular-components/content-generator';
import * as i0 from "@angular/core";
import * as i1 from "@seniorsistemas/angular-components/content-generator";
import * as i2 from "@angular/forms";
export class ContentGeneratorFieldComponent {
    field = input.required();
    formControl = input.required();
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ContentGeneratorFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ContentGeneratorFieldComponent, 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\n@if (contentGenerator.textArea()?.renderTextArea) {\n    <s-field-label\n        [field]=\"_field\"\n        [fieldContainerRef]=\"contentGenerator.textArea()?.textAreaElement?.nativeElement\"\n    ></s-field-label>\n}\n\n<s-content-generator\n    #contentGenerator\n    [rows]=\"_field.rows ?? 5\"\n    [formControl]=\"formControl()\"\n    [id]=\"_field.name\"\n    [readonly]=\"_field.readonly ? _field.readonly() : false\"\n    [prompt]=\"_field.prompt ?? ''\"\n    [placeholder]=\"_field.placeholder ?? ''\"\n    [label]=\"_field.label ?? ''\"\n    [speechRecognition]=\"_field.speechRecognition ?? false\"\n    [keepContext]=\"_field.keepContext\"\n    [speechRecognitionPlaceholder]=\"_field.speechRecognitionPlaceholder\"\n    [maxLength]=\"_field.maxLength ?? null\"\n></s-content-generator>\n", styles: [".footer-content{display:flex;flex-grow:0}.textarea-ia{display:flex;align-items:flex-end;gap:8px}.textarea-ia s-textarea{width:100%}.iassist-button{display:flex;justify-content:center;align-items:center;border:none;border-radius:50%;box-shadow:none;cursor:pointer;height:32px;width:32px}.dialog-header{display:flex;gap:12px}.dialog-header .iassist-icon{display:block;height:24px;width:24px}.speech-recognition{margin-bottom:12.5px}\n"], dependencies: [{ kind: "component", type: FieldLabelComponent, selector: "s-field-label", inputs: ["field", "fieldContainerRef"] }, { kind: "ngmodule", type: ContentGeneratorModule }, { kind: "component", type: i1.ContentGeneratorComponent, selector: "s-content-generator, s-text-area-ia", inputs: ["id", "label", "placeholder", "prompt", "readonly", "rows", "cols", "speechRecognition", "keepContext", "speechRecognitionPlaceholder", "maxLength", "textAreaStyle"] }, { 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"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ContentGeneratorFieldComponent, decorators: [{
            type: Component,
            args: [{ standalone: true, imports: [FieldLabelComponent, ContentGeneratorModule, ReactiveFormsModule], template: "@let _field = field();\n\n@if (contentGenerator.textArea()?.renderTextArea) {\n    <s-field-label\n        [field]=\"_field\"\n        [fieldContainerRef]=\"contentGenerator.textArea()?.textAreaElement?.nativeElement\"\n    ></s-field-label>\n}\n\n<s-content-generator\n    #contentGenerator\n    [rows]=\"_field.rows ?? 5\"\n    [formControl]=\"formControl()\"\n    [id]=\"_field.name\"\n    [readonly]=\"_field.readonly ? _field.readonly() : false\"\n    [prompt]=\"_field.prompt ?? ''\"\n    [placeholder]=\"_field.placeholder ?? ''\"\n    [label]=\"_field.label ?? ''\"\n    [speechRecognition]=\"_field.speechRecognition ?? false\"\n    [keepContext]=\"_field.keepContext\"\n    [speechRecognitionPlaceholder]=\"_field.speechRecognitionPlaceholder\"\n    [maxLength]=\"_field.maxLength ?? null\"\n></s-content-generator>\n", styles: [".footer-content{display:flex;flex-grow:0}.textarea-ia{display:flex;align-items:flex-end;gap:8px}.textarea-ia s-textarea{width:100%}.iassist-button{display:flex;justify-content:center;align-items:center;border:none;border-radius:50%;box-shadow:none;cursor:pointer;height:32px;width:32px}.dialog-header{display:flex;gap:12px}.dialog-header .iassist-icon{display:block;height:24px;width:24px}.speech-recognition{margin-bottom:12.5px}\n"] }]
        }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC1nZW5lcmF0b3ItZmllbGQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci1jb21wb25lbnRzL2R5bmFtaWMtZm9ybS9zcmMvbGliL2R5bmFtaWMtZm9ybS9mb3JtLWZpZWxkL2ZpZWxkcy9jb250ZW50LWdlbmVyYXRvci9jb250ZW50LWdlbmVyYXRvci1maWVsZC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLWNvbXBvbmVudHMvZHluYW1pYy1mb3JtL3NyYy9saWIvZHluYW1pYy1mb3JtL2Zvcm0tZmllbGQvZmllbGRzL2NvbnRlbnQtZ2VuZXJhdG9yL2NvbnRlbnQtZ2VuZXJhdG9yLWZpZWxkLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ2pELE9BQU8sRUFBZSxtQkFBbUIsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBR2xFLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHVEQUF1RCxDQUFDO0FBQzVGLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHNEQUFzRCxDQUFDOzs7O0FBUTlGLE1BQU0sT0FBTyw4QkFBOEI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