import { Icon } from './Icon.jsx'

export const Toolbar = ({ mode, setMode }) => {
    return (
        <div class="toolbar">
            <div class="item logo">PHC / Orari</div>
            <div class="options">
                <div class="item option">
                    <div class="compound">
                        <button
                            class={'radio' + (mode === 'course' ? ' selected' : '')}
                            onClick={() => setMode('course')}
                        >
                            Corso
                        </button>
                        <button
                            class={'radio' + (mode === 'work-week-v' ? ' selected' : '')}
                            onClick={() => setMode('work-week-v')}
                        >
                            Settimana
                        </button>
                        <button
                            class={'radio' + (mode === 'work-week-h' ? ' selected' : '')}
                            onClick={() => setMode('work-week-h')}
                        >
                            Settimana<sup>T</sup>
                        </button>
                    </div>
                </div>
                <div class="item option">
                    <button class="icon">
                        <Icon name="print" />
                    </button>
                </div>
            </div>
        </div>
    )
}
