'use strict';require('./es.symbol.description-bf683260.js'),require('./es.array.includes-3990bfec.js');var utils=require('./utils-2e136d65.js'),BaseIcon=require('./BaseIcon-1ed3bf6e.js'),BaseBoxTooltip=require('./BaseBoxTooltip-3a57b281.js'),normalizeComponent=require('./normalize-component-d9981c57.js');require('./export-61511812.js'),require('./array-species-create-c414c2ec.js'),require('./object-keys-12f2c5e5.js'),require('./set-to-string-tag-240bb3b0.js'),require('./array-iteration-f8b4483d.js'),require('./function-bind-context-e4685306.js'),require('./typeof-6b9e62b8.js'),require('./unsupportedIterableToArray-40a00645.js'),require('./es.array.join-88750c41.js'),require('./array-method-is-strict-99341ee3.js'),require('./es.array.map-4cfed4ef.js'),require('./array-method-has-species-support-983ac207.js'),require('./regexp-exec-abstract-216cd44a.js'),require('./string-multibyte-a2dff6e3.js'),require('./regexp-flags-abc49c4a.js'),require('./es.string.split-98e29ede.js'),require('./is-regexp-d6f1551e.js'),require('./create-property-240c71a5.js'),require('./es.object.to-string-f27a75a8.js'),require('./classof-819fc780.js'),require('./es.regexp.to-string-5606f728.js'),require('./es.string.replace-25e9e098.js'),require('./es.string.includes-ec03e639.js'),require('./es.array.sort-7d68b195.js'),require('./web.dom-collections.for-each-c07b0e22.js'),require('./dom-iterables-e2602b7e.js'),require('./es.object.keys-c57f02bd.js'),require('./es.array.concat-bb8715dc.js');/**
 * Standard buttons
 */

var script = {
  name: 'BaseButton',
  components: {
    BaseIcon: BaseIcon["default"],
    BaseBoxTooltip: BaseBoxTooltip.B
  },
  props: {
    /**
     * Button Text
     */
    text: {
      type: String,
      default: 'Submit'
    },
    // TODO: need to check if it is possible to use custom icons --> if yes description!

    /**
     * icon displayed <br>
     * see [BaseIcon](#baseicon) for available icons<br>
     */
    icon: {
      type: String,
      default: null
    },

    /**
     * set from outside if icon should be made invisible
     */
    hideIcon: {
      type: Boolean,
      default: false
    },

    /**
     * specify if icon should be displayed left or right
     */
    iconPosition: {
      type: String,
      default: 'left',
      validator: function validator(val) {
        return ['top', 'right', 'left'].includes(val);
      }
    },

    /**
     * set button active (will display a colored border on botton) (row style)
     * or keep icon colored (single style)
     */
    active: {
      type: Boolean,
      default: false
    },

    /**
     * specify a button style
     */
    buttonStyle: {
      type: String,
      default: 'single',
      validator: function validator(val) {
        return ['single', 'row', 'secondary'].includes(val);
      }
    },

    /**
     * display icon with app-color
     */
    iconColored: {
      type: Boolean,
      default: false
    },

    /**
     * specify icon size<br>
     *   this will have no effect on button-style: secondary - icon will always be small
     */
    iconSize: {
      type: String,
      default: 'small',
      validator: function validator(val) {
        return ['small', 'large'].includes(val);
      }
    },

    /**
     * set a title for the icon that is shown as a tooltip on hover
     */
    iconTitle: {
      type: String,
      default: ''
    },

    /**
     * set button inactive
     */
    disabled: {
      type: Boolean,
      default: false
    },

    /**
     * set button type
     */
    buttonType: {
      type: String,
      default: 'button'
    },

    /**
     * define alignment of button content<br>
     * Info: has no effect, if iconPosition 'top' is set
     */
    alignText: {
      type: String,
      default: 'center',
      validator: function validator(val) {
        return ['center', 'left', 'right'].includes(val);
      }
    },

    /**
     * background color is fixed however at least possibility to
     * display transparent instead
     */
    hasBackgroundColor: {
      type: Boolean,
      default: true
    },

    /**
     * show tooltip
     */
    showTooltip: {
      type: Boolean,
      default: false
    },

    /**
     * Add a button description to be used by aria-describedby
     */
    description: {
      type: String,
      default: ''
    },

    /**
     * set false if button text should not be wrapped
     */
    buttonTextWrap: {
      type: Boolean,
      default: true
    }
  },
  data: function data() {
    return {
      internalId: utils.c()
    };
  },
  methods: {
    clicked: function clicked(event) {
      /**
       * triggered on button click
       *
       * @type {Event}
       */
      this.$emit('clicked', event);
    }
  }
};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('button', {
    class: ['base-button', "base-button-" + _vm.buttonStyle, "base-button-icon-" + _vm.iconPosition, "base-button-align-" + _vm.alignText, {
      'base-button-background': _vm.hasBackgroundColor
    }, {
      'base-button-active': _vm.active
    }],
    attrs: {
      "disabled": _vm.disabled,
      "aria-disabled": _vm.disabled,
      "aria-describedby": _vm.internalId,
      "type": _vm.buttonType
    },
    on: {
      "click": function click($event) {
        $event.preventDefault();
        return _vm.clicked.apply(null, arguments);
      }
    }
  }, [_vm.icon ? _c('base-icon', {
    class: ['base-button-icon', 'base-button-icon-' + _vm.iconSize, {
      'base-button-icon-colored': _vm.iconColored
    }, {
      'base-button-icon-hide': _vm.hideIcon
    }],
    attrs: {
      "name": _vm.icon,
      "title": _vm.iconTitle
    }
  }) : _vm._e(), _vm._ssrNode(" "), _vm._t("left-of-text"), _vm._ssrNode(" "), _vm._t("text", function () {
    return [_vm.text ? _c('span', {
      class: ['base-button-text', {
        'base-button-text__nowrap': !_vm.buttonTextWrap
      }]
    }, [_vm._v("\n      " + _vm._s(_vm.text) + "\n    ")]) : _vm._e()];
  }), _vm._ssrNode(" "), _vm._t("right-of-text"), _vm._ssrNode(" "), _vm.showTooltip ? _c('BaseBoxTooltip', {
    on: {
      "clicked": _vm.clicked
    }
  }) : _vm._e(), _vm._ssrNode(" " + (_vm.description ? "<span" + _vm._ssrAttr("id", _vm.internalId) + " class=\"hide\" data-v-390671d6>" + _vm._ssrEscape("\n    " + _vm._s(_vm.description) + "\n  ") + "</span>" : "<!---->"))], 2);
};

var __vue_staticRenderFns__ = [];
/* style */

var __vue_inject_styles__ = undefined;
/* scoped */

var __vue_scope_id__ = "data-v-390671d6";
/* module identifier */

var __vue_module_identifier__ = "data-v-390671d6";
/* 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 BaseButton = __vue_component__;exports["default"]=BaseButton;