(t0)
| 49 | hook: IndividualHookConfig; |
| 50 | }; |
| 51 | export function HooksConfigMenu(t0) { |
| 52 | const $ = _c(100); |
| 53 | const { |
| 54 | toolNames, |
| 55 | onExit |
| 56 | } = t0; |
| 57 | let t1; |
| 58 | if ($[0] === Symbol.for("react.memo_cache_sentinel")) { |
| 59 | t1 = { |
| 60 | mode: "select-event" |
| 61 | }; |
| 62 | $[0] = t1; |
| 63 | } else { |
| 64 | t1 = $[0]; |
| 65 | } |
| 66 | const [modeState, setModeState] = useState(t1); |
| 67 | const [disabledByPolicy, setDisabledByPolicy] = useState(_temp); |
| 68 | const [restrictedByPolicy, setRestrictedByPolicy] = useState(_temp2); |
| 69 | let t2; |
| 70 | if ($[1] === Symbol.for("react.memo_cache_sentinel")) { |
| 71 | t2 = source => { |
| 72 | if (source === "policySettings") { |
| 73 | const settings_0 = getSettings_DEPRECATED(); |
| 74 | const hooksDisabled_0 = settings_0?.disableAllHooks === true; |
| 75 | setDisabledByPolicy(hooksDisabled_0 && getSettingsForSource("policySettings")?.disableAllHooks === true); |
| 76 | setRestrictedByPolicy(getSettingsForSource("policySettings")?.allowManagedHooksOnly === true); |
| 77 | } |
| 78 | }; |
| 79 | $[1] = t2; |
| 80 | } else { |
| 81 | t2 = $[1]; |
| 82 | } |
| 83 | useSettingsChange(t2); |
| 84 | const mode = modeState.mode; |
| 85 | const selectedEvent = "event" in modeState ? modeState.event : "PreToolUse"; |
| 86 | const selectedMatcher = "matcher" in modeState ? modeState.matcher : null; |
| 87 | const mcp = useAppState(_temp3); |
| 88 | const appStateStore = useAppStateStore(); |
| 89 | let t3; |
| 90 | if ($[2] !== mcp.tools || $[3] !== toolNames) { |
| 91 | t3 = [...toolNames, ...mcp.tools.map(_temp4)]; |
| 92 | $[2] = mcp.tools; |
| 93 | $[3] = toolNames; |
| 94 | $[4] = t3; |
| 95 | } else { |
| 96 | t3 = $[4]; |
| 97 | } |
| 98 | const combinedToolNames = t3; |
| 99 | let t4; |
| 100 | if ($[5] !== appStateStore || $[6] !== combinedToolNames) { |
| 101 | t4 = groupHooksByEventAndMatcher(appStateStore.getState(), combinedToolNames); |
| 102 | $[5] = appStateStore; |
| 103 | $[6] = combinedToolNames; |
| 104 | $[7] = t4; |
| 105 | } else { |
| 106 | t4 = $[7]; |
| 107 | } |
| 108 | const hooksByEventAndMatcher = t4; |
nothing calls this directly
no test coverage detected