import React, { useEffect, useState } from 'react';
import InstantChat from '@/components/Chat/InstantChat';
import { useEstablishment } from '@/context/EstablishmentContext';
import logger from '@/utils/logger';

export default function InstantMessaging({ csrfToken }) {
  const { user, selectedEstablishmentId } = useEstablishment();

  return (
    <div className="h-full flex flex-col">
      <InstantChat
        userProfileId={user.user_id}
        establishmentId={selectedEstablishmentId}
      />
    </div>
  );
}
