// CAMINHO: frontend/src/pages/LoginPage.tsx

import React from 'react';

const LoginPage: React.FC = () => {
  const handleLogin = () => {
    // Redireciona para o caminho relativo da API
    window.location.href = '/api/v1/auth/login';
  };

  return (
    <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', height: '100vh', background: '#f0f2f5' }}>
      <div style={{ padding: '40px', background: 'white', borderRadius: '8px', boxShadow: '0 4px 12px rgba(0,0,0,0.1)', textAlign: 'center' }}>
        <h1 style={{ color: '#1c1e21', marginBottom: '8px' }}>Agenda de Contatos</h1>
        <p style={{ color: '#606770', marginBottom: '24px' }}>Conecte-se para gerenciar sua rede.</p>
        <button 
          onClick={handleLogin} 
          style={{ 
            backgroundColor: '#1877f2', 
            color: 'white', 
            border: 'none', 
            padding: '12px 24px', 
            borderRadius: '6px', 
            fontSize: '16px', 
            fontWeight: 'bold', 
            cursor: 'pointer' 
          }}
        >
          Login com Google
        </button>
      </div>
    </div>
  );
};

export default LoginPage;