import Vue from 'vue';
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';

var script = {
  name: 'GlFormFieldsLoop',
  props: {
    fields: {
      type: Object,
      required: true
    }
  },
  render(createElement) {
    const {
      Fragment
    } = Vue;

    // Vue 3, key goes on `Fragment` (<template> element)
    if (Fragment) {
      return createElement('div', Object.entries(this.fields).map(_ref => {
        let [fieldName, field] = _ref;
        return createElement(Fragment, {
          key: field.id
        }, this.$scopedSlots.default({
          fieldName,
          field
        }));
      }));
    }

    // Vue 2, key goes on element (rendered via default slot)
    return createElement('div', Object.entries(this.fields).map(_ref2 => {
      let [fieldName, field] = _ref2;
      return this.$scopedSlots.default({
        fieldName,
        field
      });
    }));
  }
};

/* script */
const __vue_script__ = script;

/* template */

  /* style */
  const __vue_inject_styles__ = undefined;
  /* scoped */
  const __vue_scope_id__ = undefined;
  /* module identifier */
  const __vue_module_identifier__ = undefined;
  /* functional template */
  const __vue_is_functional_template__ = undefined;
  /* style inject */
  
  /* style inject SSR */
  
  /* style inject shadow dom */
  

  
  const __vue_component__ = /*#__PURE__*/__vue_normalize__(
    {},
    __vue_inject_styles__,
    __vue_script__,
    __vue_scope_id__,
    __vue_is_functional_template__,
    __vue_module_identifier__,
    false,
    undefined,
    undefined,
    undefined
  );

export { __vue_component__ as default };
