(t0)
| 23 | extraSubtext?: string; |
| 24 | }; |
| 25 | function LimitBar(t0) { |
| 26 | const $ = _c(34); |
| 27 | const { |
| 28 | title, |
| 29 | limit, |
| 30 | maxWidth, |
| 31 | showTimeInReset: t1, |
| 32 | extraSubtext |
| 33 | } = t0; |
| 34 | const showTimeInReset = t1 === undefined ? true : t1; |
| 35 | const { |
| 36 | utilization, |
| 37 | resets_at |
| 38 | } = limit; |
| 39 | if (utilization === null) { |
| 40 | return null; |
| 41 | } |
| 42 | const usedText = `${Math.floor(utilization)}% used`; |
| 43 | let subtext; |
| 44 | if (resets_at) { |
| 45 | let t2; |
| 46 | if ($[0] !== resets_at || $[1] !== showTimeInReset) { |
| 47 | t2 = formatResetText(resets_at, true, showTimeInReset); |
| 48 | $[0] = resets_at; |
| 49 | $[1] = showTimeInReset; |
| 50 | $[2] = t2; |
| 51 | } else { |
| 52 | t2 = $[2]; |
| 53 | } |
| 54 | subtext = `Resets ${t2}`; |
| 55 | } |
| 56 | if (extraSubtext) { |
| 57 | if (subtext) { |
| 58 | subtext = `${extraSubtext} · ${subtext}`; |
| 59 | } else { |
| 60 | subtext = extraSubtext; |
| 61 | } |
| 62 | } |
| 63 | if (maxWidth >= 62) { |
| 64 | let t2; |
| 65 | if ($[3] !== title) { |
| 66 | t2 = <Text bold={true}>{title}</Text>; |
| 67 | $[3] = title; |
| 68 | $[4] = t2; |
| 69 | } else { |
| 70 | t2 = $[4]; |
| 71 | } |
| 72 | const t3 = utilization / 100; |
| 73 | let t4; |
| 74 | if ($[5] !== t3) { |
| 75 | t4 = <ProgressBar ratio={t3} width={50} fillColor="rate_limit_fill" emptyColor="rate_limit_empty" />; |
| 76 | $[5] = t3; |
| 77 | $[6] = t4; |
| 78 | } else { |
| 79 | t4 = $[6]; |
| 80 | } |
| 81 | let t5; |
| 82 | if ($[7] !== usedText) { |
nothing calls this directly
no test coverage detected