import { GameHint } from "./infoview/rpc_api"; import * as React from 'react'; import Markdown from './markdown'; export function Hint({hint, step, selected, toggleSelection} : {hint: GameHint, step: number, selected: number, toggleSelection: any}) { return
{hint.text}
} export function HiddenHint({hint, step, selected, toggleSelection} : {hint: GameHint, step: number, selected: number, toggleSelection: any}) { return
{hint.text}
} export function Hints({hints, showHidden, step, selected, toggleSelection} : {hints: GameHint[], showHidden: boolean, step: number, selected: number, toggleSelection: any}) { const openHints = hints.filter(hint => !hint.hidden) const hiddenHints = hints.filter(hint => hint.hidden) // TODO: Should not use index as key. return <> {openHints.map((hint, j) => )} {showHidden && hiddenHints.map((hint, j) => )} } export function DeletedHint({hint} : {hint: GameHint}) { return
{hint.text}
} export function DeletedHints({hints} : {hints: GameHint[]}) { const openHints = hints.filter(hint => !hint.hidden) const hiddenHints = hints.filter(hint => hint.hidden) // TODO: Should not use index as key. return <> {openHints.map((hint, i) => )} {hiddenHints.map((hint, i) => )} }