<app-task-form
  [task]="task | async"
  [type]="type"
  triggerDescription="tasks-automation.question-answer.trigger-description"
  footerNoteAutomation="tasks-automation.question-answer.footer.apply-automation"
  footerNoteOneTime="tasks-automation.question-answer.footer.apply-one-time"
  [validFormInside]="questionAnswerForm.valid"
  (save)="onSave($event)"
  (cancel)="backToTaskList()">
  <div>
    <nsi-two-columns-configuration-item
      itemTitle="tasks-automation.question-answer.prompts.title"
      description="tasks-automation.question-answer.prompts.description"
      badge="generic.badge.optional">
      <div class="form-container">
        <div [formGroup]="questionAnswerForm">
          <div class="form-container">
            <pa-textarea
              formControlName="question_generator_prompt"
              rows="3">
              {{ 'tasks-automation.form.prompts.question-prompt' | translate }}
            </pa-textarea>
            <pa-textarea
              formControlName="generate_answers_prompt"
              rows="3">
              {{ 'tasks-automation.form.prompts.answer-prompt' | translate }}
            </pa-textarea>
          </div>
        </div>
      </div>
    </nsi-two-columns-configuration-item>
    <nsi-two-columns-configuration-item
      itemTitle="tasks-automation.question-answer.max-questions.title"
      description="tasks-automation.question-answer.max-questions.description">
      <div [formGroup]="questionAnswerForm">
        <pa-input
          formControlName="max_questions"
          type="number"
          [min]="MAX_QUESTIONS.min"
          [max]="MAX_QUESTIONS.max">
          {{ 'tasks-automation.question-answer.max-questions.label' | translate }}
        </pa-input>
      </div>
    </nsi-two-columns-configuration-item>
  </div>
</app-task-form>
