<commit_before>import React from 'react'
import PropTypes from 'prop-types'
import { useFieldState, useFormState } from 'informed'
import { useIntl } from 'react-intl'
import { DataRow } from 'components/UI'
import { PasswordInput, Toggle } from 'components/Form'
import { FieldLabel } from './SettingsFieldHelpers'
import messages from './messages'

const SettingsFieldsSecurity = ({ currentConfig }) => {
  const { value: isPasswordActive } = useFieldState('password.active')
  const { submits } = useFormState()
  const willValidateInline = submits > 0
  const intl = useIntl()

  return (
    <>
      <DataRow
        left={<FieldLabel itemKey="password.active" />}
        pb={0}
        right={<Toggle field="password.active" initialValue={currentConfig.password.active} />}
      /><commit_msg>fix(ui): add password field tooltip<commit_after>import React from 'react'
import PropTypes from 'prop-types'
import { useFieldState, useFormState } from 'informed'
import { useIntl } from 'react-intl'
import { DataRow } from 'components/UI'
import { PasswordInput, FieldLabelFactory, Toggle } from 'components/Form'
import messages from './messages'

const FieldLabel = FieldLabelFactory(messages)

const SettingsFieldsSecurity = ({ currentConfig }) => {
  const { value: isPasswordActive } = useFieldState('password.active')
  const { submits } = useFormState()
  const willValidateInline = submits > 0
  const intl = useIntl()

  return (
    <>
      <DataRow
        left={<FieldLabel itemKey="password.active" tooltip="password_tooltip" />}
        right={<Toggle field="password.active" initialValue={currentConfig.password.active} />}
      />
{'fraction_non_alphanumeric': 0.12159709618874773, 'fraction_numerical': 0.0018148820326678765, 'mean_word_length': 4.422950819672131, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '7245445', 'n_tokens_mistral': 472, 'n_tokens_neox': 468, 'n_words': 122}