import useAuthStore from '../store/authStore';
import { GoogleButton } from '../auth/GoogleButton';

export function LoginPage() {
  const loginError = useAuthStore((s) => s.loginError);

  return (
    <div className="login-shell">
      <div className="login-card">
        <img className="login-logo" src="/icon-192.png" alt="EatMe" />
        <p className="login-title">EatMe &middot; Docházka</p>
        <p className="login-sub">Přihlas se firemním Google účtem</p>
        <GoogleButton />
        {loginError && <div className="login-error">{loginError}</div>}
      </div>
    </div>
  );
}
