import * as i0 from '@angular/core';
import { Injectable, viewChild, forwardRef, Component, ViewEncapsulation, Input, NgModule } from '@angular/core';
import * as i2$1 from '@angular/forms';
import { FormGroup, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { throwError } from 'rxjs';
import { catchError } from 'rxjs/operators';
import * as i1 from '@angular/common/http';
import * as i2 from '@seniorsistemas/angular-components/toast';
import * as i3 from '@ngx-translate/core';
import { TranslateModule } from '@ngx-translate/core';
import * as i4 from '@seniorsistemas/angular-components/speech-recognition';
import * as i5 from '@seniorsistemas/angular-components/button';
import { ButtonModule } from '@seniorsistemas/angular-components/button';
import * as i6 from '@seniorsistemas/angular-components/loading-state';
import { LoadingStateModule } from '@seniorsistemas/angular-components/loading-state';
import * as i7 from '@angular/common';
import { NgTemplateOutlet } from '@angular/common';
import * as i8 from '@seniorsistemas/angular-components/text-area';
import { TextAreaModule } from '@seniorsistemas/angular-components/text-area';
import * as i9 from '@seniorsistemas/angular-components/dialog';
import { DialogComponent } from '@seniorsistemas/angular-components/dialog';
import * as i10 from '@seniorsistemas/angular-components/template';
import { TemplateModule } from '@seniorsistemas/angular-components/template';

class IAssistService {
    http;
    toastService;
    constructor(http, toastService) {
        this.http = http;
        this.toastService = toastService;
    }
    askIA(context, data) {
        const prompt = data.prompt
            ? this._replacePlaceholder(context, data)
            : this._createPrompt(context, data);
        return this.http
            .post('platform/iassist/api/latest/completions', {
            prompt,
            provider: 'OPEN_AI',
            parameters: {
                model: 'gpt-3.5-turbo',
                max_tokens: 700,
                temperature: 1,
            },
        })
            .pipe(catchError((err) => {
            this.toastService.show({
                severity: 'error',
                title: err.status ? String(err.status) : 'Error',
                text: (err.error && err.error.message) || err.statusText || err.message || 'Error',
            });
            return throwError(() => new Error(err.message));
        }));
    }
    _replacePlaceholder(context, data) {
        const values = { ...data, context };
        delete values.prompt;
        let result = data.prompt;
        for (const key in { ...values, context: context }) {
            const placeholder = new RegExp(`{{\\s*${key}\\s*}}`, 'g');
            result = result.replace(placeholder, values[key]);
        }
        console.log('prompt', result);
        return result;
    }
    _createPrompt(context, data) {
        return `Crie um texto genérico para preencher o campo de textarea.
        ${data.label ? `O campo tem o label ${data.label}.` : ''}
        ${data.id ? `O campo tem o id ${data.id}.` : ''}
        ${data.placeholder ? `Considere as instruções/sugestões do placeholder: ${data.placeholder}.` : ''}
        Baseie-se no contexto informado pelo usuário: '${context}'.
        O texto deve ser formal e conter informações pertinentes a um campo como este, como se um usuário real tivesse preenchido com as informações necessárias.
        O texto deve ser neutro com relação a generos, raças, religiões, etc.
        O texto deve ser impessoal e não deve conter informações pessoais do usuário.
        Não direcione o texto a ninguém, não use expressões como: caro, atenciosamente. gostaria, agradeço. O texto deve ser genérico.

        Exemplos de texto:
        Um campo de descrição de usuário: "Usuário com 20 anos, estudante de engenharia, gosta de jogar futebol e assistir filmes."
        Outro exemplo de descrição de usuário: "Usuário administrador, com acesso total ao sistema, responsável por gerenciar os usuários e os produtos."
        Um campo de descrição de um produto: "O produto é um celular, com tela de 6 polegadas, 128GB de armazenamento, 4GB de memória RAM, câmera de 12MP e bateria de 4000mAh."
        Outro exemplo de descrição de produto: "O produto é uma geladeira, com capacidade de 500 litros, 2 portas, cor branca, com freezer e gaveta de legumes."
        Outro exemplo de descrição de produto: "O produto é uma camiseta, tamanho M, cor azul, 100% algodão, com estampa de um gato."

        Em caso de contexto incompleto crie um texto genérico, como se fosse um exemplo de preenchimento do campo.
        O texto é para um campo de textarea, então escreva um texto sucinto.
        Exiba apenas o texto do output`;
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IAssistService, deps: [{ token: i1.HttpClient }, { token: i2.ToastService }], target: i0.ɵɵFactoryTarget.Injectable });
    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IAssistService, providedIn: 'root' });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IAssistService, decorators: [{
            type: Injectable,
            args: [{ providedIn: 'root' }]
        }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ToastService }] });

class TextAreaIAComponent {
    _iassistService;
    _formBuilder;
    _translateService;
    speechRecognitionService;
    textArea = viewChild('textAreaElement');
    static id = 0;
    id = `TextAreaIA_${TextAreaIAComponent.id--}`;
    label;
    placeholder = '';
    prompt;
    readonly = false;
    rows = 10;
    cols = 10;
    speechRecognition = false;
    keepContext = false;
    speechRecognitionPlaceholder = '';
    maxLength = null;
    // public fields: FormField[] = [];
    formGroup = new FormGroup({});
    contextForm = new FormGroup({});
    isVisible = false;
    isLoading = false;
    value = '';
    _onChange;
    _onTouched;
    constructor(_iassistService, // TODO: Mover pra uma pasta global
    _formBuilder, _translateService, speechRecognitionService) {
        this._iassistService = _iassistService;
        this._formBuilder = _formBuilder;
        this._translateService = _translateService;
        this.speechRecognitionService = speechRecognitionService;
    }
    ngOnInit() {
        // this._createDialogFields();
        this._createDialogFormGroup();
    }
    writeValue(value) {
        this.value = value;
    }
    registerOnChange(onChange) {
        this._onChange = onChange;
    }
    registerOnTouched(onTouched) {
        this._onTouched = onTouched;
    }
    onValueChange(value) {
        this.value = value;
        this._onChange?.(value);
    }
    showDialog() {
        this.isVisible = true;
        if (this._onTouched) {
            this._onTouched();
        }
    }
    hideDialog() {
        this.isVisible = false;
    }
    onHideDialog() {
        if (this.isVisible === false) {
            this.formGroup.get('context')?.setValue('');
        }
    }
    submitContext() {
        const context = this.formGroup.get('context');
        if (!context) {
            return;
        }
        this.isLoading = true;
        this._iassistService
            .askIA(context.value, {
            id: this.id,
            label: this.label,
            placeholder: this.placeholder,
            prompt: this.prompt,
        })
            .pipe(catchError((err) => {
            this.isLoading = false;
            return throwError(() => new Error(err.message));
        }))
            .subscribe((res) => {
            this.value = res.text;
            this._onChange?.(this.value);
            this.isLoading = false;
        });
        this.hideDialog();
    }
    _createDialogFormGroup() {
        this.formGroup = this._formBuilder.group({
            context: [''],
        });
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TextAreaIAComponent, deps: [{ token: IAssistService }, { token: i2$1.FormBuilder }, { token: i3.TranslateService }, { token: i4.SpeechRecognitionService }], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.14", type: TextAreaIAComponent, selector: "s-text-area-ia", inputs: { id: "id", label: "label", placeholder: "placeholder", prompt: "prompt", readonly: "readonly", rows: "rows", cols: "cols", speechRecognition: "speechRecognition", keepContext: "keepContext", speechRecognitionPlaceholder: "speechRecognitionPlaceholder", maxLength: "maxLength" }, providers: [
            {
                provide: NG_VALUE_ACCESSOR,
                useExisting: forwardRef(() => TextAreaIAComponent),
                multi: true,
            },
        ], viewQueries: [{ propertyName: "textArea", first: true, predicate: ["textAreaElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<s-loading-state\n    [loading]=\"isLoading\"\n    [blockWindow]=\"true\"\n>\n</s-loading-state>\n\n<s-dialog\n    [(visible)]=\"isVisible\"\n    [escapeOnEsc]=\"false\"\n    [destroyClickOutside]=\"false\"\n    size=\"lg\"\n    (visibleChange)=\"onHideDialog()\"\n>\n    <ng-template sTemplate=\"header\">\n        <div class=\"dialog-header\">\n            <span class=\"iassist-icon\">\n                <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n            </span>\n            IAssist - Content Generator\n        </div>\n    </ng-template>\n\n    <form [formGroup]=\"formGroup\">\n        <label for=\"context\">{{ 'platform.angular_components.context' | translate }}</label>\n        <s-textarea\n            inputId=\"context\"\n            formControlName=\"context\"\n            [speechRecognition]=\"speechRecognition\"\n            [keepContext]=\"keepContext\"\n        />\n    </form>\n\n    <ng-template sTemplate=\"footer\">\n        <div class=\"footer-content\">\n            <s-button\n                id=\"-submit-button\"\n                type=\"button\"\n                [label]=\"'platform.angular_components.generate_text' | translate\"\n                (clicked)=\"submitContext()\"\n                sTooltip=\"(ALT + SHIFT + S)\"\n                showDelay=\"500\"\n            >\n            </s-button>\n            <s-button\n                id=\"-cancel-button\"\n                type=\"button\"\n                priority=\"link\"\n                [label]=\"'platform.angular_components.cancel' | translate\"\n                (clicked)=\"hideDialog()\"\n                sTooltip=\"(ALT + SHIFT + C)\"\n                showDelay=\"500\"\n            >\n            </s-button>\n        </div>\n    </ng-template>\n</s-dialog>\n\n<div class=\"textarea-ia\">\n    <s-textarea\n        #textAreaElement\n        [inputId]=\"id\"\n        [(ngModel)]=\"value\"\n        (ngModelChange)=\"onValueChange($event)\"\n        [rows]=\"rows\"\n        [readOnly]=\"readonly\"\n        [placeholder]=\"placeholder\"\n        [keepContext]=\"keepContext\"\n        [speechRecognitionPlaceholder]=\"speechRecognitionPlaceholder\"\n        [maxLength]=\"maxLength\"\n        [speechRecognition]=\"speechRecognition\"\n    >\n    </s-textarea>\n    <!--TODO: Tooltip em propriedade-->\n    <button\n        class=\"iassist-button\"\n        [class.speech-recognition]=\"speechRecognition && speechRecognitionService.hasSupportSpeechRecognition\"\n        (click)=\"showDialog()\"\n        sTooltip=\"IAssist - Content Generator\"\n    >\n        <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n    </button>\n</div>\n\n<ng-template #iassistIcon>\n    <svg\n        style=\"width: 100%; height: 100%\"\n        viewBox=\"0 0 20 20\"\n        fill=\"none\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n    >\n        <path\n            d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\"\n            fill=\"#0FA389\"\n        />\n        <path\n            d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\"\n            fill=\"#0FA389\"\n        />\n        <path\n            d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\"\n            fill=\"#F3F3F5\"\n        />\n        <path\n            d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\"\n            fill=\"#0C847B\"\n        />\n        <path\n            d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\"\n            fill=\"#0C847B\"\n        />\n    </svg>\n</ng-template>\n", styles: ["s-text-area-ia.ng-invalid.ng-dirty .textarea-ia textarea{border-color:#c13018}.footer-content{display:flex;flex-grow:0}.textarea-ia{display:flex;align-items:flex-end;gap:8px}.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}s-textarea{width:100%}.speech-recognition{margin-bottom:12.5px}\n"], dependencies: [{ kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "component", type: i6.LoadingStateComponent, selector: "s-loading-state", inputs: ["indicator", "id", "blockWindow", "loading"] }, { kind: "directive", type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i8.TextAreaComponent, selector: "s-textarea", inputs: ["inputId", "rows", "speechRecognition", "keyFilter", "keepContext", "speechRecognitionPlaceholder", "maxLength", "placeholder", "inputStyle", "readOnly"] }, { kind: "component", type: i9.DialogComponent, selector: "s-dialog", inputs: ["header", "visible", "size", "contentClassName", "escapeOnEsc", "destroyClickOutside"], outputs: ["visibleChange"] }, { kind: "directive", type: i10.TemplateDirective, selector: "[sTemplate]", inputs: ["sTemplate"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TextAreaIAComponent, decorators: [{
            type: Component,
            args: [{ selector: 's-text-area-ia', providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef(() => TextAreaIAComponent),
                            multi: true,
                        },
                    ], encapsulation: ViewEncapsulation.None, template: "<s-loading-state\n    [loading]=\"isLoading\"\n    [blockWindow]=\"true\"\n>\n</s-loading-state>\n\n<s-dialog\n    [(visible)]=\"isVisible\"\n    [escapeOnEsc]=\"false\"\n    [destroyClickOutside]=\"false\"\n    size=\"lg\"\n    (visibleChange)=\"onHideDialog()\"\n>\n    <ng-template sTemplate=\"header\">\n        <div class=\"dialog-header\">\n            <span class=\"iassist-icon\">\n                <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n            </span>\n            IAssist - Content Generator\n        </div>\n    </ng-template>\n\n    <form [formGroup]=\"formGroup\">\n        <label for=\"context\">{{ 'platform.angular_components.context' | translate }}</label>\n        <s-textarea\n            inputId=\"context\"\n            formControlName=\"context\"\n            [speechRecognition]=\"speechRecognition\"\n            [keepContext]=\"keepContext\"\n        />\n    </form>\n\n    <ng-template sTemplate=\"footer\">\n        <div class=\"footer-content\">\n            <s-button\n                id=\"-submit-button\"\n                type=\"button\"\n                [label]=\"'platform.angular_components.generate_text' | translate\"\n                (clicked)=\"submitContext()\"\n                sTooltip=\"(ALT + SHIFT + S)\"\n                showDelay=\"500\"\n            >\n            </s-button>\n            <s-button\n                id=\"-cancel-button\"\n                type=\"button\"\n                priority=\"link\"\n                [label]=\"'platform.angular_components.cancel' | translate\"\n                (clicked)=\"hideDialog()\"\n                sTooltip=\"(ALT + SHIFT + C)\"\n                showDelay=\"500\"\n            >\n            </s-button>\n        </div>\n    </ng-template>\n</s-dialog>\n\n<div class=\"textarea-ia\">\n    <s-textarea\n        #textAreaElement\n        [inputId]=\"id\"\n        [(ngModel)]=\"value\"\n        (ngModelChange)=\"onValueChange($event)\"\n        [rows]=\"rows\"\n        [readOnly]=\"readonly\"\n        [placeholder]=\"placeholder\"\n        [keepContext]=\"keepContext\"\n        [speechRecognitionPlaceholder]=\"speechRecognitionPlaceholder\"\n        [maxLength]=\"maxLength\"\n        [speechRecognition]=\"speechRecognition\"\n    >\n    </s-textarea>\n    <!--TODO: Tooltip em propriedade-->\n    <button\n        class=\"iassist-button\"\n        [class.speech-recognition]=\"speechRecognition && speechRecognitionService.hasSupportSpeechRecognition\"\n        (click)=\"showDialog()\"\n        sTooltip=\"IAssist - Content Generator\"\n    >\n        <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n    </button>\n</div>\n\n<ng-template #iassistIcon>\n    <svg\n        style=\"width: 100%; height: 100%\"\n        viewBox=\"0 0 20 20\"\n        fill=\"none\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n    >\n        <path\n            d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\"\n            fill=\"#0FA389\"\n        />\n        <path\n            d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\"\n            fill=\"#0FA389\"\n        />\n        <path\n            d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\"\n            fill=\"#F3F3F5\"\n        />\n        <path\n            d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\"\n            fill=\"#0C847B\"\n        />\n        <path\n            d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\"\n            fill=\"#0C847B\"\n        />\n    </svg>\n</ng-template>\n", styles: ["s-text-area-ia.ng-invalid.ng-dirty .textarea-ia textarea{border-color:#c13018}.footer-content{display:flex;flex-grow:0}.textarea-ia{display:flex;align-items:flex-end;gap:8px}.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}s-textarea{width:100%}.speech-recognition{margin-bottom:12.5px}\n"] }]
        }], ctorParameters: () => [{ type: IAssistService }, { type: i2$1.FormBuilder }, { type: i3.TranslateService }, { type: i4.SpeechRecognitionService }], propDecorators: { id: [{
                type: Input
            }], label: [{
                type: Input
            }], placeholder: [{
                type: Input
            }], prompt: [{
                type: Input
            }], readonly: [{
                type: Input
            }], rows: [{
                type: Input
            }], cols: [{
                type: Input
            }], speechRecognition: [{
                type: Input
            }], keepContext: [{
                type: Input
            }], speechRecognitionPlaceholder: [{
                type: Input
            }], maxLength: [{
                type: Input
            }] } });

class TextAreaIAModule {
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TextAreaIAModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: TextAreaIAModule, declarations: [TextAreaIAComponent], imports: [FormsModule,
            ReactiveFormsModule,
            TranslateModule,
            ButtonModule,
            LoadingStateModule,
            NgTemplateOutlet,
            TextAreaModule,
            DialogComponent,
            TemplateModule], exports: [TextAreaIAComponent] });
    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TextAreaIAModule, imports: [FormsModule,
            ReactiveFormsModule,
            TranslateModule,
            ButtonModule,
            LoadingStateModule,
            TextAreaModule,
            DialogComponent,
            TemplateModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TextAreaIAModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [
                        FormsModule,
                        ReactiveFormsModule,
                        TranslateModule,
                        ButtonModule,
                        LoadingStateModule,
                        NgTemplateOutlet,
                        TextAreaModule,
                        DialogComponent,
                        TemplateModule
                    ],
                    declarations: [TextAreaIAComponent],
                    exports: [TextAreaIAComponent],
                }]
        }] });

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

export { TextAreaIAComponent, TextAreaIAModule };
//# sourceMappingURL=seniorsistemas-angular-components-text-area-ia.mjs.map
