import { h } from 'preact'; import { useState } from 'preact/hooks'; import styles from '../NewGame.module.css'; import type { BreakRule } from '@lib/domain/types'; interface BreakRuleStepProps { onNext: (rule: BreakRule) => void; onCancel: () => void; initialValue?: BreakRule; } export const BreakRuleStep = ({ onNext, onCancel, initialValue = 'winnerbreak' }: BreakRuleStepProps) => { const [rule, setRule] = useState(initialValue ?? 'winnerbreak'); return (
Break-Regel wählen
{[ { key: 'winnerbreak', label: 'Winnerbreak' }, { key: 'wechselbreak', label: 'Wechselbreak' }, ].map(opt => ( ))}
); };