(block: BlockConfig)
| 207 | * Check if a block has trigger capability (contains trigger mode subblocks) |
| 208 | */ |
| 209 | export function hasTriggerCapability(block: BlockConfig): boolean { |
| 210 | const hasTriggerModeSubBlocks = block.subBlocks.some((subBlock) => subBlock.mode === 'trigger') |
| 211 | |
| 212 | if (block.category === 'triggers') { |
| 213 | return hasTriggerModeSubBlocks |
| 214 | } |
| 215 | |
| 216 | return ( |
| 217 | (block.triggers?.enabled === true && block.triggers.available.length > 0) || |
| 218 | hasTriggerModeSubBlocks |
| 219 | ) |
| 220 | } |
| 221 | |
| 222 | /** |
| 223 | * Get blocks that should appear in the triggers tab |
no outgoing calls
no test coverage detected