1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Button } from 'react-bootstrap';
4 import { useTranslation } from 'react-i18next';
6 import GuessingGameAutoTracking from './GuessingGameAutoTracking';
10 } from '../../helpers/Channel';
12 const GuessingGameControls = ({
19 const { t } = useTranslation();
22 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
23 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
27 <div className="d-flex align-items-center justify-content-between mt-3">
28 <div className="button-bar">
31 variant={hasActiveGuessing(channel) ? 'success' : 'outline-success'}
38 hasActiveGuessing(channel) && isAcceptingGuesses(channel)
39 ? 'danger' : 'outline-danger'
47 variant={hasActiveGuessing(channel) ? 'secondary' : 'outline-secondary'}
52 <GuessingGameAutoTracking
58 {hasActiveGuessing(channel) ?
59 <div className="bkgg-buttons d-grid gap-3 my-3">
60 {solutions.map(solution =>
63 onClick={() => onSolve(solution)}
65 variant="outline-secondary"
75 GuessingGameControls.propTypes = {
76 channel: PropTypes.shape({
78 onCancel: PropTypes.func,
79 onSolve: PropTypes.func,
80 onStart: PropTypes.func,
81 onStop: PropTypes.func,
84 export default GuessingGameControls;