'use strict';require('./es.symbol.description-f8df06f1.js'),require('./es.array.includes-cbacb659.js');var utils=require('./utils-307b9d48.js'),BaseIcon=require('./BaseIcon-d76fa559.js'),BaseBoxTooltip=require('./BaseBoxTooltip-05bf6cf4.js'),normalizeComponent=require('./normalize-component-a3a558e7.js');require('./well-known-symbol-f1447879.js'),require('./array-species-create-6d7d1ca3.js'),require('./object-keys-1798218f.js'),require('./set-to-string-tag-6fc79baa.js'),require('./array-iteration-ec368d38.js'),require('./function-bind-context-6bee5e36.js'),require('./typeof-6b9e62b8.js'),require('./unsupportedIterableToArray-40a00645.js'),require('./es.array.join-d5827db6.js'),require('./array-method-is-strict-eaf6e6bc.js'),require('./es.array.map-8b8b1771.js'),require('./array-method-has-species-support-43b9931e.js'),require('./regexp-exec-abstract-9fcb71e6.js'),require('./string-multibyte-d552dade.js'),require('./regexp-flags-e93c043d.js'),require('./es.string.split-8e95587e.js'),require('./is-regexp-3d2f5c60.js'),require('./create-property-7113990d.js'),require('./es.object.to-string-6eda7e05.js'),require('./classof-b3ccaaa6.js'),require('./es.regexp.to-string-da3f9988.js'),require('./es.string.replace-0a90b609.js'),require('./es.string.includes-fd50111e.js'),require('./es.array.sort-71ab4282.js'),require('./web.dom-collections.for-each-a9e9d823.js'),require('./dom-iterables-e2602b7e.js'),require('./es.object.keys-258d7358.js'),require('./es.array.concat-cf822c2c.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-343e9d28>" + _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-343e9d28";
/* module identifier */

var __vue_module_identifier__ = "data-v-343e9d28";
/* 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;