import { deconstructMapping } from './mapping'

export function selectActionsFromLogic (mapping = []) {
  const actionsArray = deconstructMapping(mapping)

  if (!actionsArray) {
    return
  }

  let hash = {}

  actionsArray.forEach(([logic, from, to]) => {
    const actions = logic && logic.actions ? logic.actions : logic

    if (from === '*') {
      hash[to] = actions
    } else if (typeof actions[from] === 'function') {
      hash[to] = actions[from]
    } else {
      console.error(`[KEA-LOGIC] action "${from}" missing for logic:`, logic)
      console.trace()
    }
  })

  return hash
}

@@ -332,64 +332,8 @@
  if 
-(from === '*') %7B%0A      hash%5Bto%5D = actions%0A    %7D else if 
 (typ

remove actions * support