<commit_before>import _ from 'underscore';
import React from 'react';
import {AccountStore, SendActionsStore} from 'nylas-exports';
import {ListensToFluxStore} from 'nylas-component-kit';
import ConfigSchemaItem from './config-schema-item';


function getExtendedSendingSchema(configSchema) {
  const accounts = AccountStore.accounts();
  // const sendActions = SendActionsStore.sendActions()
  const defaultAccountIdForSend = {
    'type': 'string',
    'title': 'Send new messages from',
    'default': 'selected-mailbox',
    'enum': ['selected-mailbox'].concat(accounts.map(acc => acc.id)),
    'enumLabels': ['Account of selected mailbox'].concat(accounts.map(acc => acc.me().toString())),
  }
  // const defaultSendType = {
  //   'type': 'string',
  //   'default': 'send',
  //   'enum': sendActions.map(({configKey}) => configKey),
  //   'enumLabels': sendActions.map(({title}) => title),
  //   'title': "Default send behavior",
  // }

  _.extend(configSchema.properties.sending.properties, {
    defaultAccountIdForSend,
  });
  return configSchema.properties.sending;
}

function SendingSection(props) {
  const {config, sendingConfigSchema} = props<commit_msg>add comment<commit_after>import _ from 'underscore';
import React from 'react';
import {AccountStore, SendActionsStore} from 'nylas-exports';
import {ListensToFluxStore} from 'nylas-component-kit';
import ConfigSchemaItem from './config-schema-item';


function getExtendedSendingSchema(configSchema) {
  const accounts = AccountStore.accounts();
  // const sendActions = SendActionsStore.sendActions()
  const defaultAccountIdForSend = {
    'type': 'string',
    'title': 'Send new messages from',
    'default': 'selected-mailbox',
    'enum': ['selected-mailbox'].concat(accounts.map(acc => acc.id)),
    'enumLabels': ['Account of selected mailbox'].concat(accounts.map(acc => acc.me().toString())),
  }
  // TODO re-enable sending actions at some point
  // const defaultSendType = {
  //   'type': 'string',
  //   'default': 'send',
  //   'enum': sendActions.map(({configKey}) => configKey),
  //   'enumLabels': sendActions.map(({title}) => title),
  //   'title': "Default send behavior",
  // }

  _.extend(configSchema.properties.sending.properties, {
    defaultAccountIdForSend,
  });
  return configSchema.properties.sending;
}

function SendingSection(props) {
  const {config, sendingConfigSchema} = props
{'fraction_non_alphanumeric': 0.15888240200166806, 'fraction_numerical': 0.0, 'mean_word_length': 4.514942528735633, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '5829026', 'n_tokens_mistral': 724, 'n_tokens_neox': 723, 'n_words': 155}