<commit_before>import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FORM_CONTROL_INPUT, FormControlInput, FormControlErrorStateAgent, FORM_CONTROL_ERROR_STATE_AGENT, FormControlHost, FORM_CONTROL_HOST } from './interfaces';
import { FormControlGroupComponent } from './form-control-group.component';
import { FormControlHintComponent } from './hint.component';
import { FormControlLabelDirective } from './form-control-label.directive';
import { FormControlRequiredComponent } from './required.component';

export { FormControlGroupComponent, FORM_CONTROL_INPUT, FormControlInput, FormControlErrorStateAgent, FORM_CONTROL_ERROR_STATE_AGENT, FormControlHost, FORM_CONTROL_HOST };

// tslint:disable-next-line:only-arrow-functions
export function defaultFormControlErrorStateAgent(form?, input?) {
  return form &&
         input &&
         input .ngControl &&
         !input.isFocused &&
         input.ngControl.invalid &&
         (input.ngControl.touched || form.submitted);
}<commit_msg>form-control-group: add error state agent<commit_after>import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FORM_CONTROL_INPUT, FormControlInput, FormControlErrorStateAgent, FORM_CONTROL_ERROR_STATE_AGENT, FormControlHost, FORM_CONTROL_HOST } from './interfaces';
import { FormControlGroupComponent } from './form-control-group.component';
import { FormControlHintComponent } from './hint.component';
import { FormControlLabelDirective } from './form-control-label.directive';
import { FormControlRequiredComponent } from './required.component';

export { FormControlGroupComponent, FORM_CONTROL_INPUT, FormControlInput, FormControlErrorStateAgent, FORM_CONTROL_ERROR_STATE_AGENT, FormControlHost, FORM_CONTROL_HOST };
// tslint:disable-next-line:only-arrow-functions
export function defaultFormControlErrorStateAgent(form?, input?) {
  return form &&
         input &&
         input.ngControl &&
         input.ngControl.invalid &&
         (input.ngControl.touched || form.submitted);
}

// tslint:disable-next-line:only-arrow-functions
export function dirtyFormControlErrorStateAgent(form?, input?) {
  return form &&
         input &&
         input .ngControl &&
         input.ngControl.invalid &&
         (input.ngControl.dirty || form.submitted);
}
{'fraction_non_alphanumeric': 0.10973526900085397, 'fraction_numerical': 0.0, 'mean_word_length': 5.054263565891473, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3619420', 'n_tokens_mistral': 635, 'n_tokens_neox': 631, 'n_words': 125}