(t0)
| 22 | onCancel: () => void; |
| 23 | }; |
| 24 | export function SelectHookMode(t0) { |
| 25 | const $ = _c(19); |
| 26 | const { |
| 27 | selectedEvent, |
| 28 | selectedMatcher, |
| 29 | hooksForSelectedMatcher, |
| 30 | hookEventMetadata, |
| 31 | onSelect, |
| 32 | onCancel |
| 33 | } = t0; |
| 34 | const title = hookEventMetadata.matcherMetadata !== undefined ? `${selectedEvent} - Matcher: ${selectedMatcher || "(all)"}` : selectedEvent; |
| 35 | if (hooksForSelectedMatcher.length === 0) { |
| 36 | let t1; |
| 37 | if ($[0] === Symbol.for("react.memo_cache_sentinel")) { |
| 38 | t1 = <Box flexDirection="column" gap={1}><Text dimColor={true}>No hooks configured for this event.</Text><Text dimColor={true}>To add hooks, edit settings.json directly or ask Claude.</Text></Box>; |
| 39 | $[0] = t1; |
| 40 | } else { |
| 41 | t1 = $[0]; |
| 42 | } |
| 43 | let t2; |
| 44 | if ($[1] !== hookEventMetadata.description || $[2] !== onCancel || $[3] !== title) { |
| 45 | t2 = <Dialog title={title} subtitle={hookEventMetadata.description} onCancel={onCancel} inputGuide={_temp}>{t1}</Dialog>; |
| 46 | $[1] = hookEventMetadata.description; |
| 47 | $[2] = onCancel; |
| 48 | $[3] = title; |
| 49 | $[4] = t2; |
| 50 | } else { |
| 51 | t2 = $[4]; |
| 52 | } |
| 53 | return t2; |
| 54 | } |
| 55 | const t1 = hookEventMetadata.description; |
| 56 | let t2; |
| 57 | if ($[5] !== hooksForSelectedMatcher) { |
| 58 | t2 = hooksForSelectedMatcher.map(_temp2); |
| 59 | $[5] = hooksForSelectedMatcher; |
| 60 | $[6] = t2; |
| 61 | } else { |
| 62 | t2 = $[6]; |
| 63 | } |
| 64 | let t3; |
| 65 | if ($[7] !== hooksForSelectedMatcher || $[8] !== onSelect) { |
| 66 | t3 = value => { |
| 67 | const index_0 = parseInt(value, 10); |
| 68 | const hook_0 = hooksForSelectedMatcher[index_0]; |
| 69 | if (hook_0) { |
| 70 | onSelect(hook_0); |
| 71 | } |
| 72 | }; |
| 73 | $[7] = hooksForSelectedMatcher; |
| 74 | $[8] = onSelect; |
| 75 | $[9] = t3; |
| 76 | } else { |
| 77 | t3 = $[9]; |
| 78 | } |
| 79 | let t4; |
| 80 | if ($[10] !== onCancel || $[11] !== t2 || $[12] !== t3) { |
| 81 | t4 = <Box flexDirection="column"><Select options={t2} onChange={t3} onCancel={onCancel} /></Box>; |
nothing calls this directly
no test coverage detected