'use client';

import { useTranslations } from 'next-intl';
import { TreatmentWorkspace } from '@/components/ui/treatment/TreatmentWorkspace';
import { useAuth } from '@/lib/hooks/useAuth';

export default function TreatmentPage() {
  const t = useTranslations('treatment');
  const { user, currentOrganization, isAuthReady } = useAuth();

  if (!isAuthReady || !user) {
    return (
      <div className="text-sm text-text-muted">{t('loading')}</div>
    );
  }

  return (
    <TreatmentWorkspace userId={user.id} currentOrganization={currentOrganization} />
  );
}
