import React from 'react';
import { useAuth } from '../auth/context';
import { ADMIN_PUBLIC_LANDING_PATH } from '../constants';

export default function LogoutPage() {
  const { logout } = useAuth();
  const safeAreaStyle: React.CSSProperties = {
    paddingTop: 'calc(env(safe-area-inset-top, 0px) + 16px)',
    paddingBottom: 'calc(env(safe-area-inset-bottom, 0px) + 16px)',
  };

  React.useEffect(() => {
    logout({ redirect: ADMIN_PUBLIC_LANDING_PATH });
  }, [logout]);

  return (
    <div
      className="flex min-h-screen items-center justify-center bg-gradient-to-br from-rose-50 via-white to-slate-50 text-sm text-slate-600"
      style={safeAreaStyle}
    >
      <div className="rounded-2xl border border-rose-100 bg-white/90 px-6 py-4 shadow-sm shadow-rose-100/60">
        Abmeldung wird vorbereitet ...
      </div>
    </div>
  );
}
