'use client';

import { useAuth } from '@client/contexts/AuthContext';
import {
  DEMO_MODE_ENABLED,
  DEMO_OWNER_EMAIL,
  DEMO_ADMIN_EMAIL,
} from '@/lib/demoMode';

const DEMO_EMAILS = new Set<string>([DEMO_OWNER_EMAIL, DEMO_ADMIN_EMAIL]);

export function useIsDemoSession(): boolean {
  const { user } = useAuth();
  if (!DEMO_MODE_ENABLED) return false;
  const email: string | undefined = user?.email;
  if (!email) return false;
  return DEMO_EMAILS.has(email);
}
