<?php

/**
 * =========================================
 * DEMOBANK TOKEN MESSAGES (1–6 STEPS)
 * =========================================
 * Used for progressive transfer verification UI
 * and security messaging system.
 */

function getTokenMessage($step) {

    $messages = [

        1 => [
            "title" => "Security Check Initiated",
            "message" => "Verifying user identity and transaction integrity...",
            "duration" => 15
        ],

        2 => [
            "title" => "Account Validation",
            "message" => "Confirming account details and authorization level...",
            "duration" => 15
        ],

        3 => [
            "title" => "Fraud Detection Scan",
            "message" => "Running advanced fraud prevention analysis...",
            "duration" => 15
        ],

        4 => [
            "title" => "Transaction Risk Assessment",
            "message" => "Evaluating transaction risk profile and security score...",
            "duration" => 15
        ],

        5 => [
            "title" => "Final Authorization Layer",
            "message" => "Applying final security verification and compliance check...",
            "duration" => 15
        ],

        6 => [
            "title" => "Approval Complete",
            "message" => "Transaction approved. Preparing final processing...",
            "duration" => 15
        ]
    ];

    return $messages[$step] ?? [
        "title" => "Unknown Step",
        "message" => "Invalid token step provided.",
        "duration" => 0
    ];
}

/**
 * OPTIONAL: Return full sequence (useful for UI animations)
 */
function getAllTokenMessages() {
    return [
        getTokenMessage(1),
        getTokenMessage(2),
        getTokenMessage(3),
        getTokenMessage(4),
        getTokenMessage(5),
        getTokenMessage(6)
    ];
}