import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import Styled from '../styles'; const intlMessages = defineMessages({ manageRooms: { id: 'app.createBreakoutRoom.manageRoomsLabel', description: 'Label for manage rooms', }, resetAssignments: { id: 'app.createBreakoutRoom.resetAssignments', description: 'reset assignments label', }, resetAssignmentsDesc: { id: 'app.createBreakoutRoom.resetAssignmentsDesc', description: 'reset assignments label description', }, randomlyAssign: { id: 'app.createBreakoutRoom.randomlyAssign', description: 'randomly assign label', }, randomlyAssignDesc: { id: 'app.createBreakoutRoom.randomlyAssignDesc', description: 'randomly assign label description', }, }); interface ManageRoomLabelProps { numberOfRoomsIsValid: boolean; leastOneUserIsValid: boolean; onAssignReset: () => void; onAssignRandomly: () => void; } const ManageRoomLabel: React.FC = ({ numberOfRoomsIsValid, leastOneUserIsValid, onAssignReset, onAssignRandomly, }) => { const intl = useIntl(); return ( {intl.formatMessage(intlMessages.manageRooms)} {leastOneUserIsValid ? ( ) : ( )} ); }; export default ManageRoomLabel;