// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_READ_ANYTHING_READ_ANYTHING_PREFS_H_
#define CHROME_BROWSER_UI_READ_ANYTHING_READ_ANYTHING_PREFS_H_

#include "build/build_config.h"
#include "chrome/common/buildflags.h"

#if !BUILDFLAG(IS_ANDROID)

namespace user_prefs {
class PrefRegistrySyncable;
}

namespace prefs {

// String to represent the user's preferred font name for the read anything UI.
inline constexpr char kAccessibilityReadAnythingFontName[] =
    "settings.a11y.read_anything.font_name";

// Double to represent the user's preferred font size scaling factor.
inline constexpr char kAccessibilityReadAnythingFontScale[] =
    "settings.a11y.read_anything.font_scale";

// Int value to represent the user's preferred color settings.
inline constexpr char kAccessibilityReadAnythingColorInfo[] =
    "settings.a11y.read_anything.color_info";

// Int value to represent the user's preferred line spacing setting.
inline constexpr char kAccessibilityReadAnythingLineSpacing[] =
    "settings.a11y.read_anything.line_spacing";

// Int value to represent the user's preferred letter spacing setting.
inline constexpr char kAccessibilityReadAnythingLetterSpacing[] =
    "settings.a11y.read_anything.letter_spacing";

// String to represent the user's preferred voice for reading aloud.
// With auto voice switching on, it's a map to represent the user's preferred
// voice per language for reading aloud.
// TODO(crbug.com/40927698): Rename to kAccessibilityReadAnythingVoices when we
// enable automatic voice switching.
inline constexpr char kAccessibilityReadAnythingVoiceName[] =
    "settings.a11y.read_anything.voice_name";

// Double to represent the user's preferred speech rate setting.
inline constexpr char kAccessibilityReadAnythingSpeechRate[] =
    "settings.a11y.read_anything.speech_rate";

// Int value to represent the user's preferred granularity for highlighting as
// text is read.
inline constexpr char kAccessibilityReadAnythingHighlightGranularity[] =
    "settings.a11y.read_anything.highlight_granularity";

// Int value to represent the user's last chosen line focus mode.
inline constexpr char kAccessibilityReadAnythingLineFocus[] =
    "settings.a11y.read_anything.line_focus";

// Int value to represent the user's preferred line focus mode when it is
// enabled. This is different from the above preference as the above pref can be
// the line focus off value, where this cannot be.
inline constexpr char kAccessibilityReadAnythingLastNonDisabledLineFocus[] =
    "settings.a11y.read_anything.last_non_disabled_line_focus";

inline constexpr char kAccessibilityReadAnythingLinksEnabled[] =
    "settings.a11y.read_anything.links_enabled";

inline constexpr char kAccessibilityReadAnythingImagesEnabled[] =
    "settings.a11y.read_anything.images_enabled";

// List of strings to represent the user's preferred
// languages for the read anything UI.
inline constexpr char kAccessibilityReadAnythingLanguagesEnabled[] =
    "settings.a11y.read_anything.languages_enabled";

// The date that Reading mode was last opened. This is used to uninstall
// voices if reading mode has been unopened for a longer period of time.
// One preference is used to keep track of when reading mode was last opened
// and one preference is used to keep track of if there was a previous engine
// reinstall in order to prevent unnecessary reinstalls.
inline constexpr char kAccessibilityReadAnythingDateLastOpened[] =
    "settings.a11y.read_anything.last_opened_date";
inline constexpr char kAccessibilityReadAnythingTTSEngineReinstalled[] =
    "settings.a11y.read_anything.tts_engine_reinstalled";

// The count of the omnibox entry point chip being ignored. Used to determine
// when / how to continue showing the entry point.
inline constexpr char kAccessibilityReadAnythingOmniboxChipIgnoredCount[] =
    "settings.a11y.read_anything.omnibox_chip_ignored_count";

// The last opened presentation state of reading mode. This is used to
// determine whether to reopen reading mode in full-screen or side panel
// view.
inline constexpr char kAccessibilityReadAnythingLastOpenedPresentationState[] =
    "settings.a11y.read_anything.last_opened_presentation_state";

// A list of timestamps of when the user last started a
// Reading Mode session. This is used to determine when to show the HaTS survey
// to the user.
inline constexpr char kAccessibilityReadAnythingRecentUsagesStartTimes[] =
    "settings.a11y.read_anything.recent_usages_start_times";

}  // namespace prefs

void RegisterReadAnythingProfilePrefs(
    user_prefs::PrefRegistrySyncable* registry);

#endif  // !BUILDFLAG(IS_ANDROID)

#endif  // CHROME_BROWSER_UI_READ_ANYTHING_READ_ANYTHING_PREFS_H_
