"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GO_AGENT_CONFIG = void 0;
const package_manager_detection_1 = require("../../lib/package-manager-detection");
const constants_1 = require("../../lib/constants");
const utils_1 = require("./utils");
exports.GO_AGENT_CONFIG = {
    metadata: {
        name: 'Go',
        glyph: '🐹',
        glyphColor: '#00ADD8',
        integration: constants_1.Integration.go,
        beta: true,
        docsUrl: 'https://amplitude.com/docs/sdks/analytics/go/go-sdk',
    },
    detection: {
        packageName: 'github.com/amplitude/analytics-go',
        packageDisplayName: 'Go',
        usesPackageJson: false,
        getVersion: () => undefined,
        detect: utils_1.detectGoProject,
        detectPackageManager: package_manager_detection_1.goPackageManager,
    },
    environment: {
        uploadToHosting: false,
        getEnvVars: (apiKey, host) => ({
            AMPLITUDE_API_KEY: apiKey,
            AMPLITUDE_SERVER_URL: host,
        }),
    },
    analytics: {
        getTags: () => ({}),
    },
    prompts: {
        projectTypeDetection: 'This is a Go project. Look for go.mod and go.sum to confirm.',
        packageInstallation: 'Use Go modules: run `go get github.com/amplitude/analytics-go` to add the dependency (go.mod and go.sum are updated automatically).',
        getAdditionalContextLines: () => [
            'Framework docs ID: go (use amplitude://docs/frameworks/go for documentation)',
            'SDK: github.com/amplitude/analytics-go',
            'Initialization: config := amplitude.NewConfig(os.Getenv("AMPLITUDE_API_KEY")); client := amplitude.NewClient(config)',
            'Always call client.Shutdown() on application exit to flush queued events',
        ],
    },
    ui: {
        successMessage: 'Amplitude integration complete',
        estimatedDurationMinutes: 5,
        getOutroChanges: () => [
            'Analyzed your Go project structure',
            'Added github.com/amplitude/analytics-go to go.mod',
            'Configured Amplitude client initialization',
        ],
        getOutroNextSteps: () => [
            'Run your application to verify the integration',
            'Visit your Amplitude dashboard to see incoming events',
            'Use client.Track(amplitude.Event{...}) for custom events',
            'Ensure client.Shutdown() is called on exit to flush queued events',
        ],
    },
};
