import { type NewPathFormValues } from 'src/pages/dashboard/Learning/Paths/types';
import { megabytesToBytes } from 'src/utils/filesUtils';

export const MAX_COURSES_TO_SHOW = 5;
export const MIN_COURSES_TO_CREATE_PATH = 2;
export const PATHS_TABLE_LIMIT = 10;
export const PATHS_COURSES_LIMIT = 50;
export const PATHS_PAGE_ID = 'paths-page';
export const FILE_MAX_SIZE = megabytesToBytes(500);

export const PathSteps = {
  BASIC_INFORMATION: 'basic_information',
  CONTENT: 'content',
  CONFIGURATION: 'configuration',
  SEGMENTATION: 'segmentation',
  REVISION: 'revision',
} as const;

export const DueDateType = {
  NO_DUE_DATE: 'NO_DUE_DATE',
  CUSTOM: 'CUSTOM',
} as const;

export const CustomDueDatePeriod = {
  DAYS: 'DAYS',
  WEEKS: 'WEEKS',
  MONTHS: 'MONTHS',
} as const;

export const PathStatus = {
  ACTIVE: 'ACTIVE',
  INACTIVE: 'INACTIVE',
  DRAFT: 'DRAFT',
} as const;

export const InputsIds = {
  BASIC_INFORMATION_TITLE: 'path-basic-information-title-card',
  CONFIGURATION_DEADLINE: 'path-configuration-deadline-input',
} as const;

export const PATH_NEW_DEFAULT_VALUES: NewPathFormValues = {
  [PathSteps.BASIC_INFORMATION]: {
    status: null,
    id: null,
    title: '',
    description: '',
    coverPicture: null,
  },
  [PathSteps.CONTENT]: {
    courses: [],
  },
  [PathSteps.CONFIGURATION]: {
    isObligatory: true,
    sendPushNotification: true,
    sendEmailNotification: false,
    isSequential: false,
    issueCertificate: false,
    dueDate: null,
  },
  [PathSteps.SEGMENTATION]: null,
};
