def reset_short
import cswap-bend-cli@0.1.0.0/tui/card.bend as Cardimport Base
import cswap-bend-cli@0.1.0.0/tui/fmt.bend as F
79# "resets 2h 13m" (or "resets now"); empty when no reset is known.
80def reset_short(+r: Maybe<&2, U32>, +now: U32) -> String:
81 match r:
82 case None{}:
83 ""
84 case Some{t}:
85 F.sel.s(U32.is_gt(t, now), "resets " ++ F.duration((t - now : U32)), "resets now")