exports.ids = [8];
exports.modules = {

/***/ 136:
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(155);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add CSS to SSR context
var add = __webpack_require__(5).default
module.exports.__inject__ = function (context) {
  add("a07bae24", content, true, context)
};

/***/ }),

/***/ 154:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_IconPicker_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(136);
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_IconPicker_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_IconPicker_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_IconPicker_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_IconPicker_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));


/***/ }),

/***/ 155:
/***/ (function(module, exports, __webpack_require__) {

// Imports
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(4);
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
// Module
___CSS_LOADER_EXPORT___.push([module.i, ".icon-picker .w-input__icon--inner-right{font-size:1.5rem;line-height:2rem;top:0;cursor:pointer}.icon-picker__list{box-shadow:6px 6px 40px grey;border-radius:.75rem;padding:1rem;max-height:200px;background-color:var(--color-shade-0);overflow:hidden;overflow-y:auto}.w-app--dark .icon-picker__list{box-shadow:6px 6px 40px #000;background-color:var(--color-shade-2)}.icon-picker__list-inner{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));grid-gap:.75rem;gap:.75rem}.icon-picker__status{font-size:1rem;line-height:1.5rem;font-weight:500}", ""]);
// Exports
module.exports = ___CSS_LOADER_EXPORT___;


/***/ }),

/***/ 194:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: D:/Development/StarlaneStudios/vindigo/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!D:/Development/StarlaneStudios/vindigo/node_modules/nuxt/node_modules/@nuxt/components/dist/loader.js??ref--0-0!D:/Development/StarlaneStudios/vindigo/node_modules/vue-loader/lib??vue-loader-options!./components/IconPicker.vue?vue&type=template&id=4dcced90&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('w-menu',{staticClass:"icon-picker",attrs:{"z-index":"600","align-left":"","bottom":"","custom":""},scopedSlots:_vm._u([{key:"activator",fn:function(){return [_c('w-input',{staticClass:"icon-picker__input",attrs:{"inner-icon-left":_vm.localValue || 'mdi mdi-chevron-down',"inner-icon-right":"mdi mdi-close","placeholder":"Search an icon...","autocomplete":"off"},on:{"focus":_vm.openMenu,"click:inner-icon-right":_vm.clear},model:{value:(_vm.searchFilter),callback:function ($$v) {_vm.searchFilter=$$v},expression:"searchFilter"}})]},proxy:true}]),model:{value:(_vm.iconMenu),callback:function ($$v) {_vm.iconMenu=$$v},expression:"iconMenu"}},[_vm._v(" "),_c('div',{staticClass:"icon-picker__list"},[(_vm.iconList.length)?_c('div',{staticClass:"icon-picker__list-inner"},_vm._l((_vm.iconList),function(icon){return _c('w-button',{key:icon,attrs:{"icon":_vm.formatIcon(icon),"color":"misc-0","lg":""},on:{"click":function($event){return _vm.selectIcon(icon)}}})}),1):_c('div',{staticClass:"icon-picker__status"},[_vm._v("\n\t\t\t"+_vm._s(_vm.isLoading ? 'Loading...' : 'No results found')+"\n\t\t")])])])}
var staticRenderFns = []


// CONCATENATED MODULE: ./components/IconPicker.vue?vue&type=template&id=4dcced90&

// EXTERNAL MODULE: external "graphql-tag"
var external_graphql_tag_ = __webpack_require__(23);
var external_graphql_tag_default = /*#__PURE__*/__webpack_require__.n(external_graphql_tag_);

// EXTERNAL MODULE: external "lodash"
var external_lodash_ = __webpack_require__(7);

// EXTERNAL MODULE: external "vue"
var external_vue_ = __webpack_require__(1);
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);

// CONCATENATED MODULE: D:/Development/StarlaneStudios/vindigo/node_modules/babel-loader/lib??ref--13-0!D:/Development/StarlaneStudios/vindigo/node_modules/ts-loader??ref--13-1!D:/Development/StarlaneStudios/vindigo/node_modules/nuxt/node_modules/@nuxt/components/dist/loader.js??ref--0-0!D:/Development/StarlaneStudios/vindigo/node_modules/vue-loader/lib??vue-loader-options!./components/IconPicker.vue?vue&type=script&lang=ts&
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function (resolve) {
      resolve(value);
    });
  }

  return new (P || (P = Promise))(function (resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }

    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }

    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }

    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
};




/* harmony default export */ var IconPickervue_type_script_lang_ts_ = (external_vue_default.a.extend({
  name: 'IconPicker',
  props: {
    value: {
      type: String
    }
  },
  data: () => ({
    iconList: [],
    localValue: '',
    searchFilter: '',
    isLoading: false,
    iconMenu: false,
    fetchDebounce: null
  }),
  watch: {
    value(value) {
      this.localValue = value;
    },

    searchFilter(value) {
      this.iconMenu = !!value;
      this.iconList = [];
      this.isLoading = true;
      this.fetchDebounce();
    }

  },

  created() {
    this.localValue = this.value || '';
    this.fetchDebounce = Object(external_lodash_["debounce"])(() => {
      this.fetchIcons();
    }, 500);
  },

  methods: {
    formatIcon(icon) {
      return `mdi mdi-${icon}`;
    },

    openMenu() {
      if (this.searchFilter) {
        this.iconMenu = true;
      }
    },

    clear() {
      this.searchFilter = '';
      this.localValue = '';
      this.iconMenu = false;
    },

    fetchIcons() {
      return __awaiter(this, void 0, void 0, function* () {
        const res = yield this.$api.query(external_graphql_tag_default.a`
				query ($search: String) {
					icons(query: $search)
				}
			`, {
          search: this.searchFilter
        });
        this.iconList = res.icons;
        this.isLoading = false;
      });
    },

    selectIcon(icon) {
      const name = this.formatIcon(icon);
      this.localValue = name;
      this.$emit('input', name);
      this.iconMenu = false;
    }

  }
}));
// CONCATENATED MODULE: ./components/IconPicker.vue?vue&type=script&lang=ts&
 /* harmony default export */ var components_IconPickervue_type_script_lang_ts_ = (IconPickervue_type_script_lang_ts_); 
// EXTERNAL MODULE: D:/Development/StarlaneStudios/vindigo/node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);

// CONCATENATED MODULE: ./components/IconPicker.vue



function injectStyles (context) {
  
  var style0 = __webpack_require__(154)
if (style0.__inject__) style0.__inject__(context)

}

/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  components_IconPickervue_type_script_lang_ts_,
  render,
  staticRenderFns,
  false,
  injectStyles,
  null,
  "80f8611e"
  
)

/* harmony default export */ var IconPicker = __webpack_exports__["default"] = (component.exports);

/***/ })

};;
//# sourceMappingURL=icon-picker.js.map