(t0)
| 223 | emptyText: string; |
| 224 | }; |
| 225 | function List(t0) { |
| 226 | const $ = _c(27); |
| 227 | const { |
| 228 | visible, |
| 229 | windowStart, |
| 230 | visibleCount, |
| 231 | total, |
| 232 | focusedIndex, |
| 233 | direction, |
| 234 | getKey, |
| 235 | renderItem, |
| 236 | emptyText |
| 237 | } = t0; |
| 238 | if (visible.length === 0) { |
| 239 | let t1; |
| 240 | if ($[0] !== emptyText) { |
| 241 | t1 = <Text dimColor={true}>{emptyText}</Text>; |
| 242 | $[0] = emptyText; |
| 243 | $[1] = t1; |
| 244 | } else { |
| 245 | t1 = $[1]; |
| 246 | } |
| 247 | let t2; |
| 248 | if ($[2] !== t1 || $[3] !== visibleCount) { |
| 249 | t2 = <Box height={visibleCount} flexShrink={0}>{t1}</Box>; |
| 250 | $[2] = t1; |
| 251 | $[3] = visibleCount; |
| 252 | $[4] = t2; |
| 253 | } else { |
| 254 | t2 = $[4]; |
| 255 | } |
| 256 | return t2; |
| 257 | } |
| 258 | let t1; |
| 259 | if ($[5] !== direction || $[6] !== focusedIndex || $[7] !== getKey || $[8] !== renderItem || $[9] !== total || $[10] !== visible || $[11] !== visibleCount || $[12] !== windowStart) { |
| 260 | let t2; |
| 261 | if ($[14] !== direction || $[15] !== focusedIndex || $[16] !== getKey || $[17] !== renderItem || $[18] !== total || $[19] !== visible.length || $[20] !== visibleCount || $[21] !== windowStart) { |
| 262 | t2 = (item, i) => { |
| 263 | const actualIndex = windowStart + i; |
| 264 | const isFocused = actualIndex === focusedIndex; |
| 265 | const atLowEdge = i === 0 && windowStart > 0; |
| 266 | const atHighEdge = i === visible.length - 1 && windowStart + visibleCount < total; |
| 267 | return <ListItem key={getKey(item)} isFocused={isFocused} showScrollUp={direction === "up" ? atHighEdge : atLowEdge} showScrollDown={direction === "up" ? atLowEdge : atHighEdge} styled={false}>{renderItem(item, isFocused)}</ListItem>; |
| 268 | }; |
| 269 | $[14] = direction; |
| 270 | $[15] = focusedIndex; |
| 271 | $[16] = getKey; |
| 272 | $[17] = renderItem; |
| 273 | $[18] = total; |
| 274 | $[19] = visible.length; |
| 275 | $[20] = visibleCount; |
| 276 | $[21] = windowStart; |
| 277 | $[22] = t2; |
| 278 | } else { |
| 279 | t2 = $[22]; |
| 280 | } |
| 281 | t1 = visible.map(t2); |
| 282 | $[5] = direction; |
nothing calls this directly
no outgoing calls
no test coverage detected