import { ROLE_NAMES } from './roles';

export const COMMUNICATION_CHANNELS = Object.freeze({
  IN_APP: 'in_app',
});

export const COMMUNICATION_AUDIENCES = Object.freeze({
  GUARDIANS: 'guardians',
  STAFF: 'staff',
});

export const COMMUNICATION_STATUSES = Object.freeze({
  SENT: 'sent',
});

export const COMMUNICATION_RECIPIENT_TYPES = Object.freeze({
  GUARDIAN: 'guardian',
});

export const COMMUNICATION_EVENT_TYPES = Object.freeze({
  MEETING: 'meeting',
  DRILL: 'drill',
  EVENT: 'event',
  DEADLINE: 'deadline',
});

export type CommunicationEventType = 'meeting' | 'drill' | 'event' | 'deadline';

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

export type ParentMessageCategory =
  | 'behavior'
  | 'event'
  | 'progress'
  | 'general';

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

export const DEFAULT_PARENT_MESSAGE_CATEGORY: ParentMessageCategory = 'general';

export const COMMUNICATION_MANAGER_ROLE_NAMES = Object.freeze([
  ROLE_NAMES.SUPER_ADMIN,
  ROLE_NAMES.SYSTEM_ADMIN,
  ROLE_NAMES.OWNER,
  ROLE_NAMES.SUPERINTENDENT,
  ROLE_NAMES.DIRECTOR,
]);

export const COMMUNICATION_TENANT_WIDE_ROLE_NAMES = Object.freeze([
  ROLE_NAMES.SUPER_ADMIN,
  ROLE_NAMES.SYSTEM_ADMIN,
  ROLE_NAMES.OWNER,
  ROLE_NAMES.SUPERINTENDENT,
]);
