import React, { useState } from 'react'; import { KeyIcon, SaveIcon } from './Icons'; interface ApiKeySetupProps { onKeySave: (key: string) => void; } export const ApiKeySetup: React.FC = ({ onKeySave }) => { const [localApiKey, setLocalApiKey] = useState(''); const handleSave = () => { if (localApiKey.trim()) { onKeySave(localApiKey.trim()); } }; return (

Configurar Chave de API

Para começar, insira sua chave de API do Google Gemini. Ela será mantida segura no seu navegador.

setLocalApiKey(e.target.value)} onKeyDown={(e) => e.key === 'Enter' && handleSave()} autoComplete="off" />

Não tem uma chave? Obtenha no Google AI Studio.

); };