import { ReactNode, useEffect } from 'react';
import { toast as sonnerToast } from 'sonner';
import { useAgent, useSessionContext } from '@livekit/components-react';
import { WarningIcon } from '@phosphor-icons/react';
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
interface ToastProps {
title: ReactNode;
description: ReactNode;
}
function toastAlert(toast: ToastProps) {
const { title, description } = toast;
return sonnerToast.custom(
(id) => (
{reasons[0]}
} > ), }); end(); } }, [agent, isConnected, end]); }