(id: string)
| 21 | lastFocused = active instanceof HTMLElement ? active : undefined |
| 22 | } |
| 23 | const commandDisabled = (id: string) => { |
| 24 | const option = props.command.options.find((option) => option.id === id) |
| 25 | if (!option) return true |
| 26 | return option.disabled ?? false |
| 27 | } |
| 28 | const runCommand = (id: string) => { |
| 29 | if (commandDisabled(id)) return |
| 30 | props.command.trigger(id) |
no test coverage detected