(t0)
| 37 | children: ((state: ButtonState) => React.ReactNode) | React.ReactNode; |
| 38 | }; |
| 39 | function Button(t0) { |
| 40 | const $ = _c(30); |
| 41 | let autoFocus; |
| 42 | let children; |
| 43 | let onAction; |
| 44 | let ref; |
| 45 | let style; |
| 46 | let t1; |
| 47 | if ($[0] !== t0) { |
| 48 | ({ |
| 49 | onAction, |
| 50 | tabIndex: t1, |
| 51 | autoFocus, |
| 52 | children, |
| 53 | ref, |
| 54 | ...style |
| 55 | } = t0); |
| 56 | $[0] = t0; |
| 57 | $[1] = autoFocus; |
| 58 | $[2] = children; |
| 59 | $[3] = onAction; |
| 60 | $[4] = ref; |
| 61 | $[5] = style; |
| 62 | $[6] = t1; |
| 63 | } else { |
| 64 | autoFocus = $[1]; |
| 65 | children = $[2]; |
| 66 | onAction = $[3]; |
| 67 | ref = $[4]; |
| 68 | style = $[5]; |
| 69 | t1 = $[6]; |
| 70 | } |
| 71 | const tabIndex = t1 === undefined ? 0 : t1; |
| 72 | const [isFocused, setIsFocused] = useState(false); |
| 73 | const [isHovered, setIsHovered] = useState(false); |
| 74 | const [isActive, setIsActive] = useState(false); |
| 75 | const activeTimer = useRef(null); |
| 76 | let t2; |
| 77 | let t3; |
| 78 | if ($[7] === Symbol.for("react.memo_cache_sentinel")) { |
| 79 | t2 = () => () => { |
| 80 | if (activeTimer.current) { |
| 81 | clearTimeout(activeTimer.current); |
| 82 | } |
| 83 | }; |
| 84 | t3 = []; |
| 85 | $[7] = t2; |
| 86 | $[8] = t3; |
| 87 | } else { |
| 88 | t2 = $[7]; |
| 89 | t3 = $[8]; |
| 90 | } |
| 91 | useEffect(t2, t3); |
| 92 | let t4; |
| 93 | if ($[9] !== onAction) { |
| 94 | t4 = e => { |
| 95 | if (e.key === "return" || e.key === " ") { |
| 96 | e.preventDefault(); |
nothing calls this directly
no test coverage detected