import { makeStyles, tokens } from '@fluentui/react-components'

/**
 * Shared error-text styling (M12). The red `colorPaletteRedForeground1` was being
 * applied via inline `style={{ color: … }}` across the app; this hook is the one
 * place that owns it.
 *
 * - `error` — a single line of error copy (e.g. an inline validation/result message).
 * - `errorPre` — the same colour but preserving newlines/long tokens, for multi-line
 *   yt-dlp/updater error output that would otherwise overflow.
 */
export const useErrorTextStyles = makeStyles({
  error: {
    color: tokens.colorPaletteRedForeground1
  },
  errorPre: {
    color: tokens.colorPaletteRedForeground1,
    whiteSpace: 'pre-wrap',
    wordBreak: 'break-word'
  }
})
