// entry.esm.js

/**
 *  Automated module export and auto-install
 *  https://vuejs.org/v2/cookbook/packaging-sfc-for-npm.html
 */

import * as components from '../src/components';
import Vue from 'vue'

/**
 * Declare install function executed by Vue.use()
 * @param Vue
 */
const install = function storefrontComponents(Vue) {
    Object.entries(components).forEach(([componentName, component]) => {
        // Outputs string similar to  Vue.component('componentName', 'component)
        Vue.component(componentName, component);
    });
};



/**
 * To allow individual component use, export components,
 * each is registered via Vue.component()
 */
export { components };

// Create module definition for Vue.use()
export default install;
