import { jsx as _jsx } from "react/jsx-runtime";
/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { Box } from 'ink';
import { AuthType } from '@vybestack/llxprt-code-core';
import { GeminiPrivacyNotice } from './GeminiPrivacyNotice.js';
import { CloudPaidPrivacyNotice } from './CloudPaidPrivacyNotice.js';
import { CloudFreePrivacyNotice } from './CloudFreePrivacyNotice.js';
import { MultiProviderPrivacyNotice } from './MultiProviderPrivacyNotice.js';
const PrivacyNoticeText = ({ config, onExit, }) => {
    const authType = config.getContentGeneratorConfig()?.authType;
    // Check if we're using a non-Gemini provider or llxprt multi-provider
    const providerManager = config.getProviderManager?.();
    const activeProvider = providerManager?.getActiveProvider?.();
    const isNonGeminiProvider = activeProvider && activeProvider.name !== 'gemini';
    // For llxprt multi-provider or when content generator is not initialized,
    // show the basic Gemini privacy notice
    if (!authType || authType === AuthType.USE_PROVIDER || isNonGeminiProvider) {
        // If we have a specific non-Gemini provider, show its notice
        if (isNonGeminiProvider) {
            return (_jsx(MultiProviderPrivacyNotice, { providerName: activeProvider.name, onExit: onExit }));
        }
        // Otherwise show basic Gemini API terms
        return _jsx(GeminiPrivacyNotice, { onExit: onExit });
    }
    switch (authType) {
        case AuthType.USE_GEMINI:
            return _jsx(GeminiPrivacyNotice, { onExit: onExit });
        case AuthType.USE_VERTEX_AI:
            return _jsx(CloudPaidPrivacyNotice, { onExit: onExit });
        case AuthType.LOGIN_WITH_GOOGLE:
        default:
            return _jsx(CloudFreePrivacyNotice, { config: config, onExit: onExit });
    }
};
export const PrivacyNotice = ({ onExit, config }) => (_jsx(Box, { borderStyle: "round", padding: 1, flexDirection: "column", children: _jsx(PrivacyNoticeText, { config: config, onExit: onExit }) }));
//# sourceMappingURL=PrivacyNotice.js.map