import './es.array.includes-1f433385.js';
import './es.array.concat-9f3136dc.js';
import { n as normalizeComponent } from './normalize-component-63e8c7a0.js';
import './es.array.join-6ca857ff.js';
import './export-ecf4b1cb.js';
import './object-keys-a5d351f7.js';
import './array-species-create-afb281e6.js';
import './create-property-c00b5c27.js';
import './array-method-has-species-support-d96108b0.js';
import './array-method-is-strict-903f485b.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.title ? _c('title', {
    attrs: {
      "id": 'title_' + _vm.id
    }
  }, [_vm._v(_vm._s(_vm.title))]) : _vm._e(), _vm._v(" "), _vm.desc ? _c('desc', {
    attrs: {
      "id": 'desc_' + _vm.id
    }
  }, [_vm._v(_vm._s(_vm.desc))]) : _vm._e(), _vm._v(" "), _vm.baseIcons ? _c('use', {
    attrs: {
      "href": _vm.icon
    }
  }) : _vm._e()]);
};

var __vue_staticRenderFns__ = [];
/* style */

var __vue_inject_styles__ = undefined;
/* scoped */

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

var __vue_module_identifier__ = undefined;
/* functional template */

var __vue_is_functional_template__ = false;
/* style inject */

/* style inject SSR */

/* style inject shadow dom */

var __vue_component__ = /*#__PURE__*/normalizeComponent({
  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__;

export { BaseIcon as default };
