'use strict';require('./es.array.includes-8b336760.js'),require('./es.array.concat-dd2e767c.js');var normalizeComponent=require('./normalize-component-ebe0c011.js');require('./es.array.join-443a49dd.js'),require('./well-known-symbol-d17f132e.js'),require('./object-keys-68ce563f.js'),require('./array-species-create-cd337f69.js'),require('./create-property-843cca47.js'),require('./array-method-has-species-support-73df5c77.js'),require('./array-method-is-strict-46936434.js');//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/**
 * A wrapper component for base icons
 */
var script = {
  name: 'BaseIcon',
  props: {
    /**
     * define icon name
     */
    name: {
      type: String,
      default: null,
      validator: function validator(val) {
        return ['add-existing-collection', 'add-existing-object', 'add-new-collection', 'add-new-object', 'archive-arrow', 'archive-empty', 'archive-sheets', 'arrow-left', 'attachment', 'attention', 'audio-object', 'calendar-many', 'calendar-number', 'camera', 'check-mark', 'clock', 'collection', 'download', 'drag-lines', 'drag-n-drop', 'drop-down', 'duplicate', 'edit', 'eye-hide', 'eye', 'file-object', 'forbidden', 'home', 'image-object', 'information', 'licence', 'logo', 'magnifier', 'next', 'options-menu', 'people', 'play', 'plus', 'prev', 'print', 'refresh', 'remove', 'save-file', 'share', 'sort', 'subscribe', 'success', 'text', 'unsubscribe', 'video-object', 'waste-bin'].includes(val);
      }
    },

    /**
     * define title tag
     */
    title: {
      type: String,
      default: ''
    },

    /**
     * define description tag
     */
    desc: {
      type: String,
      default: ''
    }
  },
  data: function data() {
    return {
      // path to base-ui-icons.svg
      baseIcons: null
    };
  },
  computed: {
    icon: function icon() {
      return "".concat(this.baseIcons, "#").concat(this.name);
    },
    id: function id() {
      // eslint-disable-next-line no-underscore-dangle
      return this._uid;
    },
    ariaAttribute: function ariaAttribute() {
      var aria = [];

      if (this.title) {
        aria.push("title_".concat(this.id));
      }

      if (this.desc) {
        aria.push("desc_".concat(this.id));
      }

      return aria.join(' ');
    }
  },
  mounted: function mounted() {
    // window.base_ui_icons could be adapted in parent frontend project
    if (window.base_ui_icons) {
      this.baseIcons = window.base_ui_icons;
      return;
    }

    this.baseIcons = '/base-ui-icons.svg';
  }
};/* script */
var __vue_script__ = script;
/* template */

var __vue_render__ = function __vue_render__() {
  var _vm = this;

  var _h = _vm.$createElement;

  var _c = _vm._self._c || _h;

  return _c('svg', {
    staticClass: "base-icon",
    attrs: {
      "aria-labelledby": _vm.title || _vm.desc ? _vm.ariaAttribute : false
    }
  }, [_vm._ssrNode((_vm.title ? "<title" + _vm._ssrAttr("id", 'title_' + _vm.id) + " data-v-397823e6>" + _vm._ssrEscape(_vm._s(_vm.title)) + "</title>" : "<!---->") + " " + (_vm.desc ? "<desc" + _vm._ssrAttr("id", 'desc_' + _vm.id) + " data-v-397823e6>" + _vm._ssrEscape(_vm._s(_vm.desc)) + "</desc>" : "<!---->") + " " + (_vm.baseIcons ? "<use" + _vm._ssrAttr("href", _vm.icon) + " data-v-397823e6></use>" : "<!---->"))]);
};

var __vue_staticRenderFns__ = [];
/* style */

var __vue_inject_styles__ = undefined;
/* scoped */

var __vue_scope_id__ = "data-v-397823e6";
/* module identifier */

var __vue_module_identifier__ = "data-v-397823e6";
/* functional template */

var __vue_is_functional_template__ = false;
/* style inject */

/* style inject SSR */

/* style inject shadow dom */

var __vue_component__ = /*#__PURE__*/normalizeComponent.n({
  render: __vue_render__,
  staticRenderFns: __vue_staticRenderFns__
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);

var BaseIcon = __vue_component__;exports["default"]=BaseIcon;