import type {
  CommunicationEventType,
  ParentMessageCategory,
} from '@/shared/types/communications';
import type { UserRole } from '@/shared/types/app';

export const PARENT_MESSAGE_CATEGORIES: readonly ParentMessageCategory[] = [
  'behavior',
  'event',
  'progress',
  'general',
];

export const COMMUNICATION_QUERY_KEYS = {
  parentMessages: ['communications', 'parentMessages'],
  events: ['communications', 'events'],
} as const;

export const PARENT_MESSAGE_SUCCESS_CLEAR_DELAY_MS = 3000;

export const PARENT_MESSAGE_CATEGORY_FILTERS: readonly (ParentMessageCategory | 'all')[] = [
  'all',
  ...PARENT_MESSAGE_CATEGORIES,
];

export const PARENT_MESSAGE_CATEGORY_COLORS: Record<ParentMessageCategory, string> = {
  behavior: 'bg-rose-100 text-rose-700',
  event: 'bg-amber-100 text-amber-700',
  progress: 'bg-emerald-100 text-emerald-700',
  general: 'bg-blue-100 text-blue-700',
};

export const COMMUNICATION_EVENT_TYPES: readonly CommunicationEventType[] = [
  'meeting',
  'drill',
  'event',
  'deadline',
];

export const COMMUNICATION_EVENT_DEFAULT_ROLES: readonly UserRole[] = [
  'teacher',
  'support_staff',
  'office_manager',
  'director',
];

export const COMMUNICATION_EVENT_TYPE_COLORS: Record<CommunicationEventType, string> = {
  meeting: 'bg-violet-100 text-violet-700 border-violet-200',
  drill: 'bg-red-100 text-red-700 border-red-200',
  event: 'bg-amber-100 text-amber-700 border-amber-200',
  deadline: 'bg-blue-100 text-blue-700 border-blue-200',
};

export const COMMUNICATION_EVENT_ICON_BACKGROUNDS: Record<CommunicationEventType, string> = {
  meeting: 'bg-violet-200',
  drill: 'bg-red-200',
  event: 'bg-amber-200',
  deadline: 'bg-blue-200',
};
