import { FormControlLabel, Radio, RadioGroup } from '@mui/material'; import React from 'react'; import { theme } from '../../../Data/theme'; import { FivePlayers, FivePlayersSide, FourPlayers, FourPlayersSide, OnePlayerPortrait, SixPlayers, SixPlayersSide, ThreePlayers, ThreePlayersSide, TwoPlayersOppositeLandscape, TwoPlayersOppositePortrait, TwoPlayersSameSide, } from '../../../Icons/generated/Layouts'; import { twc } from 'react-twc'; import OnePlayerLandscape from '../../../Icons/generated/Layouts/OnePlayerLandscape'; import { Orientation } from '../../../Types/Settings'; const LayoutWrapper = twc.div`flex flex-row justify-center items-center self-center w-full`; type LayoutOptionsProps = { numberOfPlayers: number; selectedOrientation: Orientation; onChange: (orientation: Orientation) => void; }; export const LayoutOptions: React.FC = ({ numberOfPlayers, selectedOrientation, onChange, }) => { const iconWidth = '21vmin'; const iconHeight = '40vmin'; const iconMaxWidth = '124px'; const iconMaxHeight = '196px'; const renderLayoutOptions = () => { switch (numberOfPlayers) { case 1: return ( <> } checkedIcon={ } TouchRippleProps={{ style: { display: 'none' } }} style={{ maxWidth: iconMaxWidth, maxHeight: iconMaxHeight }} /> } label="" /> } checkedIcon={ } TouchRippleProps={{ style: { display: 'none' } }} style={{ maxWidth: iconMaxWidth, maxHeight: iconMaxHeight }} /> } label="" /> ); case 2: return ( <> } checkedIcon={ } TouchRippleProps={{ style: { display: 'none' } }} /> } label="" /> } checkedIcon={ } TouchRippleProps={{ style: { display: 'none' } }} /> } label="" /> } checkedIcon={ } TouchRippleProps={{ style: { display: 'none' } }} /> } label="" /> ); case 3: return ( <> } checkedIcon={ } TouchRippleProps={{ style: { display: 'none' } }} /> } label="" /> } checkedIcon={ } TouchRippleProps={{ style: { display: 'none' } }} /> } label="" /> ); case 4: return ( <> } checkedIcon={ } TouchRippleProps={{ style: { display: 'none' } }} /> } label="" /> } checkedIcon={ } TouchRippleProps={{ style: { display: 'none' } }} /> } label="" /> ); case 5: return ( <> } checkedIcon={ } TouchRippleProps={{ style: { display: 'none' } }} /> } label="" /> } checkedIcon={ } TouchRippleProps={{ style: { display: 'none' } }} /> } label="" /> ); case 6: return ( <> } checkedIcon={ } TouchRippleProps={{ style: { display: 'none' } }} /> } label="" /> } checkedIcon={ } TouchRippleProps={{ style: { display: 'none' } }} /> } label="" /> ); default: return null; } }; return ( { onChange(value as Orientation); }} value={selectedOrientation} style={{ justifyContent: 'center' }} > {renderLayoutOptions()} ); };