(t0)
| 12 | * Similar to BackgroundTaskStatus but for teammates |
| 13 | */ |
| 14 | export function TeamStatus(t0) { |
| 15 | const $ = _c(14); |
| 16 | const { |
| 17 | teamsSelected, |
| 18 | showHint |
| 19 | } = t0; |
| 20 | const teamContext = useAppState(_temp); |
| 21 | let t1; |
| 22 | if ($[0] !== teamContext) { |
| 23 | t1 = teamContext ? Object.values(teamContext.teammates).filter(_temp2).length : 0; |
| 24 | $[0] = teamContext; |
| 25 | $[1] = t1; |
| 26 | } else { |
| 27 | t1 = $[1]; |
| 28 | } |
| 29 | const totalTeammates = t1; |
| 30 | if (totalTeammates === 0) { |
| 31 | return null; |
| 32 | } |
| 33 | let t2; |
| 34 | if ($[2] !== showHint || $[3] !== teamsSelected) { |
| 35 | t2 = showHint && teamsSelected ? <><Text dimColor={true}>· </Text><Text dimColor={true}>Enter to view</Text></> : null; |
| 36 | $[2] = showHint; |
| 37 | $[3] = teamsSelected; |
| 38 | $[4] = t2; |
| 39 | } else { |
| 40 | t2 = $[4]; |
| 41 | } |
| 42 | const hint = t2; |
| 43 | const statusText = `${totalTeammates} ${totalTeammates === 1 ? "teammate" : "teammates"}`; |
| 44 | const t3 = teamsSelected ? "selected" : "normal"; |
| 45 | let t4; |
| 46 | if ($[5] !== statusText || $[6] !== t3 || $[7] !== teamsSelected) { |
| 47 | t4 = <Text key={t3} color="background" inverse={teamsSelected}>{statusText}</Text>; |
| 48 | $[5] = statusText; |
| 49 | $[6] = t3; |
| 50 | $[7] = teamsSelected; |
| 51 | $[8] = t4; |
| 52 | } else { |
| 53 | t4 = $[8]; |
| 54 | } |
| 55 | let t5; |
| 56 | if ($[9] !== hint) { |
| 57 | t5 = hint ? <Text> {hint}</Text> : null; |
| 58 | $[9] = hint; |
| 59 | $[10] = t5; |
| 60 | } else { |
| 61 | t5 = $[10]; |
| 62 | } |
| 63 | let t6; |
| 64 | if ($[11] !== t4 || $[12] !== t5) { |
| 65 | t6 = <>{t4}{t5}</>; |
| 66 | $[11] = t4; |
| 67 | $[12] = t5; |
| 68 | $[13] = t6; |
| 69 | } else { |
| 70 | t6 = $[13]; |
| 71 | } |
nothing calls this directly
no test coverage detected