<commit_before>import React from 'react';
import { $q } from 'ngimport';
import { flatten, isEqual, map, uniq, xor } from 'lodash';
import { Option } from 'react-select';

import { createFakeReactSyntheticEvent } from 'core/presentation/forms/inputs/utils';
import { IFormInputProps } from 'core/presentation/forms/inputs';
import { ReactSelectInput } from 'core/presentation/forms/inputs/ReactSelectInput';
import { SelectInput } from 'core/presentation/forms/inputs/SelectInput';

import { AccountService, IAccount } from './AccountService';

export interface IAccountSelectInputProps extends IFormInputProps {
  accounts: IAccount[] | string[];
  provider: string;
  readOnly?: boolean;
  renderFilterableSelectThreshold?: number;
}

export interface IAccountSelectInputState {
  mergedAccounts: string[];
  primaryAccounts: string[];
  secondaryAccounts: string[];
}

const isExpression = (account: string) => !!account && account.includes('${');

export class AccountSelectInput extends React.Component<IAccountSelectInputProps, IAccountSelectInputState> {
  public static defaultProps = {
    renderFilterableSelectThreshold: 6,
  };

  public state: IAccountSelectInputState = {
    mergedAccounts: [],
    primaryAccounts: [],
    secondaryAccounts: [],
  };

  private groupAccounts = (accounts: IAccount[] | string[]) => {
    const { name, value, onChange, provider } = this.props;<commit_msg>fix(core/account): use relative import for IFormInputProps interface (#7956)<commit_after>import React from 'react';
import { $q } from 'ngimport';
import { flatten, isEqual, map, uniq, xor } from 'lodash';
import { Option } from 'react-select';

import { createFakeReactSyntheticEvent } from 'core/presentation/forms/inputs/utils';
import { ReactSelectInput } from 'core/presentation/forms/inputs/ReactSelectInput';
import { SelectInput } from 'core/presentation/forms/inputs/SelectInput';

import { IFormInputProps } from '../presentation/forms/inputs';
import { AccountService, IAccount } from './AccountService';

export interface IAccountSelectInputProps extends IFormInputProps {
  accounts: IAccount[] | string[];
  provider: string;
  readOnly?: boolean;
  renderFilterableSelectThreshold?: number;
}

export interface IAccountSelectInputState {
  mergedAccounts: string[];
  primaryAccounts: string[];
  secondaryAccounts: string[];
}

const isExpression = (account: string) => !!account && account.includes('${');

export class AccountSelectInput extends React.Component<IAccountSelectInputProps, IAccountSelectInputState> {
  public static defaultProps = {
    renderFilterableSelectThreshold: 6,
  };

  public state: IAccountSelectInputState = {
    mergedAccounts: [],
    primaryAccounts: [],
    secondaryAccounts: [],
  };

  private groupAccounts = (accounts: IAccount[] | string[]) => {
    const { name, value, onChange, provider } = this.props;
{'fraction_non_alphanumeric': 0.11955385151620773, 'fraction_numerical': 0.0020913210177762286, 'mean_word_length': 5.628175519630485, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '4821365', 'n_tokens_mistral': 796, 'n_tokens_neox': 790, 'n_words': 202}