<?php
declare(strict_types=1);
// ==================================================
// Nuclear Fancy Pants Edition™ — NUCLEAR+++
// File: /includes/provider-help-steps.php
// Description: Provider API key wizard step definitions — shared by enqueue and template - NUCLEAR+++
// Last Edited: 2026-04-13
// ==================================================

if (!defined('ABSPATH')) {
    exit('No direct script access allowed.');
}

// Returns an array keyed by provider ID.
// Each value is the help_steps array for that provider's API key wizard.
// Consumed by class-admin-page.php (enqueue time) and modules.php (template render time).

return [
    'ai-claude' => [
        ['Go to <a href="https://console.anthropic.com" target="_blank">console.anthropic.com</a> and sign up or log in.', 'Even if you already use Claude.ai, you\'ll need a separate Console account here - they\'re two different products.', 'login'],
        ['In the left sidebar, click <strong>API Keys</strong>.', '', 'nav'],
        ['Click <strong>Create API Key</strong>, give it a name like "AutoMarketer", then click <strong>Add</strong>.', '', 'create'],
        ['<strong>Copy your key right now</strong> - this is the only time you\'ll ever see it. Anthropic never shows it again after you close this window.', 'Copy the key, switch back to this tab, then click Next. On the last step click "Got It - Back to Setup" to paste it in.', 'copy'],
        ['Click <strong>Billing</strong> in the sidebar and add at least <strong>$5</strong> in credits.', 'Pay-as-you-go - no monthly fee. $5 goes a long way.', 'billing'],
    ],
    'ai-gemini' => [
        ['Go to <a href="https://aistudio.google.com" target="_blank">aistudio.google.com</a> and sign in with your Google account.', 'No new account needed if you already have Gmail or Google Workspace.', 'login'],
        ['Accept the Terms of Service. Google will automatically create a default project for you.', '', 'nav'],
        ['In the left sidebar, click <strong>Get API key</strong>, then click <strong>Create API key</strong>.', '', 'create'],
        ['Copy your key. Unlike most providers, Google lets you view it again later - but copy it now while you\'re here.', 'Copy the key, switch back to this tab, then click "Got It - Back to Setup" to paste it in and finish setup.', 'copy'],
        ['Gemini has a generous free tier. No card is required to get started - the free tier is plenty for testing.', 'For heavier usage down the road, you can add billing at <a href="https://console.cloud.google.com" target="_blank">Google Cloud Console</a>.', 'billing'],
    ],
    'ai-grok'   => [
        ['Go to <a href="https://console.x.ai" target="_blank">console.x.ai</a> and sign up or log in.', 'You can use your X (Twitter) account or Google to sign in.', 'login'],
        ['Before creating a key, click <strong>Billing</strong> in the left sidebar and add at least <strong>$5</strong> in credits.', 'xAI requires credits before a key will work - this step must come first or your key won\'t function at all.', 'billing_first'],
        ['In the left sidebar, click <strong>API Keys</strong>, then click <strong>Create API Key</strong>.', '', 'nav'],
        ['Give your key a name and click <strong>Create</strong>.', '', 'create'],
        ['<strong>Copy your key right now</strong> - keys start with <code>xai-</code> and are only shown once.', 'Copy the key, switch back to this tab, then click "Got It - Back to Setup" to paste it in and finish setup.', 'copy'],
    ],
    'ai-openai' => [
        ['Go to <a href="https://platform.openai.com" target="_blank">platform.openai.com</a> and sign up or log in.', 'This is separate from ChatGPT - even if you pay for ChatGPT, you\'ll need to set up a Platform account and billing separately.', 'login'],
        ['Click your profile icon (top-right), then go to <strong>API Keys</strong> in the left sidebar.', '', 'nav'],
        ['Click <strong>Create new secret key</strong>, give it a name, and click <strong>Create</strong>.', '', 'create'],
        ['<strong>Copy your key right now</strong> - OpenAI only shows it once.', 'Copy the key, switch back to this tab, then click "Got It - Back to Setup" to paste it in and finish setup.', 'copy'],
        ['Go to <strong>Settings → Billing</strong> and add a payment method.', 'Pay-as-you-go - add at least $5 to get started. No monthly fee.', 'billing'],
    ],
    'ai-mistral' => [
        ['Go to <a href="https://console.mistral.ai" target="_blank">console.mistral.ai</a> and sign up or log in.', 'No credit card required to create an account. You only pay when you add credits.', 'login'],
        ['In the left sidebar, click <strong>API Keys</strong>.', '', 'nav'],
        ['Click <strong>Create new key</strong>, give it a name like "AutoMarketer", then click <strong>Create</strong>.', '', 'create'],
        ['<strong>Copy your key immediately</strong> - Mistral only shows it once after creation.', 'Copy the key, switch back to this tab, then click Next. On the last step click "Got It - Back to Setup" to paste it in.', 'copy'],
        ['Click <strong>Billing</strong> in the sidebar and add credits. Start with as little as <strong>\$5</strong>.', 'Pay-as-you-go - no monthly fee. Mistral Small costs \$0.10 per million input tokens - \$5 goes a very long way.', 'billing'],
    ],
    'email-elastic' => [
        ['Go to <a href="https://app.elasticemail.com/api/create-account" target="_blank">app.elasticemail.com</a> and create a free account.', 'No credit card required to sign up. You only pay when you send.', 'login'],
        ['After logging in, click your profile icon (top-right), then go to <strong>Settings</strong>.', '', 'nav'],
        ['In the left sidebar under Settings, click <strong>API Keys</strong>.', '', 'nav'],
        ['Click <strong>Create API Key</strong>, give it a name like "AutoMarketer", set the permission level to <strong>Full Access</strong>, then click <strong>Save</strong>.', 'Full Access is required so AutoMarketer AI can send emails and manage contacts on your behalf.', 'create'],
        ['<strong>Copy your key immediately</strong> - Elastic Email only shows it once.', 'Copy the key, switch back to this tab, then click "Got It - Back to Setup" to paste it in and finish setup.', 'copy'],
    ],
    'img-dalle' => [
        ['Go to <a href="https://platform.openai.com" target="_blank">platform.openai.com</a> and sign up or log in.', 'DALL-E uses your OpenAI Platform account - the same one used for the OpenAI copy provider. If you already activated OpenAI, you can reuse that key here.', 'login'],
        ['Click your profile icon (top-right), then go to <strong>API Keys</strong> in the left sidebar.', '', 'nav'],
        ['Click <strong>Create new secret key</strong>, give it a name, and click <strong>Create</strong>.', 'If you already have an OpenAI key from the copy provider setup, you can use the same key - no need to create another one.', 'create'],
        ['<strong>Copy your key right now</strong> - OpenAI only shows it once.', 'Copy the key, switch back to this tab, then click "Got It - Back to Setup" to paste it in and finish setup.', 'copy'],
        ['Go to <strong>Settings &rarr; Billing</strong> and add a payment method if you haven\'t already.', 'DALL-E 3 costs $0.04 per image. A $5 credit gets you over 100 images to start.', 'billing'],
    ],
    'img-imagen' => [
        ['Go to <a href="https://aistudio.google.com" target="_blank">aistudio.google.com</a> and sign in with your Google account.', 'Imagen uses your Google AI Studio API key - the same one used for the Gemini copy provider. If you already activated Gemini, you can reuse that key here.', 'login'],
        ['In the left sidebar, click <strong>Get API key</strong>, then click <strong>Create API key</strong>.', 'If you already have a Google AI key from Gemini setup, you can use the same key - no need to create another one.', 'create'],
        ['Copy your key. Google lets you view it again later - but copy it now while you\'re here.', 'Copy the key, switch back to this tab, then click "Got It - Back to Setup" to paste it in and finish setup.', 'copy'],
        ['Imagen is billed through Google Cloud. Go to <a href="https://console.cloud.google.com/billing" target="_blank">Google Cloud Console</a> and add a payment method.', 'There is no free tier for image generation - billing must be enabled before your first image will generate.', 'billing'],
    ],
    'img-aurora' => [
        ['Go to <a href="https://console.x.ai" target="_blank">console.x.ai</a> and sign up or log in.', 'Aurora uses your xAI API key - the same one used for the Grok copy provider. If you already activated Grok, you can reuse that key here.', 'login'],
        ['Before creating a key, click <strong>Billing</strong> in the left sidebar and add at least <strong>$5</strong> in credits.', 'xAI requires credits before a key will work - this step must come first or your key won\'t function at all.', 'billing_first'],
        ['In the left sidebar, click <strong>API Keys</strong>, then click <strong>Create API Key</strong>.', 'If you already have an xAI key from Grok setup, you can use the same key - no need to create another one.', 'nav'],
        ['Give your key a name and click <strong>Create</strong>.', '', 'create'],
        ['<strong>Copy your key right now</strong> - keys start with <code>xai-</code> and are only shown once.', 'Copy the key, switch back to this tab, then click "Got It - Back to Setup" to paste it in and finish setup.', 'copy'],
    ],
];