/**
 * Index module for the directory.
 * This is an auto-generated file and DO NOT edit manually.
 * @module Index
 *
 * Generated by {{generator}}, from a template provided by {{ pkg.name }}.
 *
 * @see https://facebook.github.io/react/
 */

'use strict'

{{#each params.modules}}
import {{name}} from './{{filename}}'
{{/each}}

/** @lends Index */
const Index = {
{{#each params.modules}}  {{name}}{{#if @last}}{{else}},{{/if}}
{{/each}}
}

/** Dynamic resolver */
const Resolver = Object.assign(function resolve(name) {
  if(!name){
    return
  }
  if (Index[name]) {
    return Index[name]
  } else {
    throw new Error(`Unknown name: ${name}`)
  }
}, Index)

export default Resolver

export {
{{#each params.modules}}  {{name}}{{#if @last}}{{else}},{{/if}}
{{/each}}
}