package dev.privacyllc.period.feature.lock

/**
 * Every word the lock screen can show, in one place so it can be checked.
 *
 * The lock screen is the app's only **semi-public** surface: it is what appears
 * when the owner opens the app in front of somebody else, and what anybody who
 * picks the phone up sees. So none of it may contain
 * `NotificationCopy.SENSITIVE_WORDS`, and `LockCopyTest` asserts exactly that.
 *
 * The strings live here rather than inline because the obvious alternative — a
 * source-grep guard over `LockScreen.kt` — cannot work: the KDoc on that file
 * *explains* the rule, and therefore contains the very words it forbids. That is
 * `GUARDS.md` §2, "a source-grep guard must tell code from the comment about
 * code", met head-on. Checking values instead of text sidesteps it entirely.
 */
internal object LockCopy {

    const val TITLE = "Enter your PIN"
    const val FIELD_LABEL = "PIN"
    const val SHOW = "Show PIN"
    const val HIDE = "Hide PIN"
    const val UNLOCK = "Unlock"
    const val USE_BIOMETRIC = "Use fingerprint"
    const val FORGOT = "Forgot your PIN?"
    const val WRONG = "That is not the PIN."

    /**
     * Deliberately says nothing about what is stored — only that this device can
     * no longer check the PIN, and what the way out is.
     */
    const val KEY_UNAVAILABLE =
        "This device can no longer check your PIN. What you have recorded is still " +
            "here, but the app cannot open it. Starting over is the only way back in."

    fun tryAgainIn(formatted: String) = "Try again in $formatted."

    /** Everything above, for the test that checks the whole surface at once. */
    val all: List<String> = listOf(
        TITLE, FIELD_LABEL, SHOW, HIDE, UNLOCK, USE_BIOMETRIC, FORGOT, WRONG,
        KEY_UNAVAILABLE, tryAgainIn("1:00"),
    )
}
