<commit_before>import { Command } from '../../ui'

class ToggleFindAndReplaceCommand extends Command {

  getCommandState() {
    return {
      disabled: false
    }
  }

  execute({editorSession}) {
    let findAndReplaceManager = editorSession.getManager('find-and-replace')
    let findAndReplaceState = findAndReplaceManager.getCommandState()
    if (!findAndReplaceState.disabled) {
      findAndReplaceManager.disable()
    }
  }
}

export default ToggleFindAndReplaceCommand<commit_msg>Disable CloseFindAndReplaceCommand when find and replace is inactive.<commit_after>import { Command } from '../../ui'

class ToggleFindAndReplaceCommand extends Command {

  getCommandState({editorSession}) {
    let findAndReplaceManager = editorSession.getManager('find-and-replace')
    let state = findAndReplaceManager.getCommandState()
    return {
      disabled: state.disabled
    }
  }

  execute({editorSession}) {
    let findAndReplaceManager = editorSession.getManager('find-and-replace')
    let findAndReplaceState = findAndReplaceManager.getCommandState()
    if (!findAndReplaceState.disabled) {
      findAndReplaceManager.disable()
    }
  }
}

export default ToggleFindAndReplaceCommand
{'fraction_non_alphanumeric': 0.09492089925062448, 'fraction_numerical': 0.0, 'mean_word_length': 4.31858407079646, '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': '2365271', 'n_tokens_mistral': 324, 'n_tokens_neox': 320, 'n_words': 62}