import { useLokaliseTranslation } from 'src/utils/i18n';

import { SessionSelectionCards } from './SessionSelectionCards';

export const SessionAttendance = () => {
  const { t } = useLokaliseTranslation(['learning', 'forms']);

  const options = [
    {
      value: true,
      label: t('forms:mandatory'),
      description: t('session.attendance.mandatory'),
    },
    {
      value: false,
      label: t('general:optional'),
      description: t('session.attendance.optional'),
    },
  ];

  return (
    <SessionSelectionCards
      title={t('session.attendance.title')}
      options={options}
      name="configuration.isObligatory"
    />
  );
};
