'use client';
import React, { ReactNode } from 'react';
import { useAppStore } from '@/lib/store';
import CommunicationView from './communication-view';
import ParentCommunicationView from './parent-communication-view';
interface UnifiedCommunicationProps {
variant?: 'auto' | 'teacher' | 'parent' | 'student';
className?: string;
}
/**
* Unified Communication Component
* Consolidates teacher, parent, and student communication views.
* Automatically selects the correct view based on user role.
*/
export function UnifiedCommunication({
variant = 'auto',
className
}: UnifiedCommunicationProps) {
const currentUser = useAppStore((s) => s.currentUser);
// Determine which view to show
const getView = (): ReactNode => {
// Override variant takes precedence
if (variant === 'teacher') {
return