import { __extends, __assign, __decorate, __metadata } from 'tslib';
import { Prop, Component } from 'vue-property-decorator';
import BaseComponent from '../../BaseComponent.js';
import { getStyles } from './CompoundButton.styles.js';
import { BaseButton } from '../BaseButton.js';

var CompoundButton = function(_super) {
  __extends(CompoundButton2, _super);
  function CompoundButton2() {
    return _super !== null && _super.apply(this, arguments) || this;
  }
  Object.defineProperty(CompoundButton2.prototype, "internalStyles", {
    get: function() {
      var _a = this, _b = _a.primary, primary = _b === void 0 ? false : _b, theme = _a.theme, styles = _a.styles;
      return getStyles(theme, styles, primary);
    },
    enumerable: false,
    configurable: true
  });
  CompoundButton2.prototype.render = function(h) {
    var _a = this, primary = _a.primary, internalStyles = _a.internalStyles;
    var props = {
      variantClassName: primary ? "ms-Button--compoundPrimary" : "ms-Button--compound",
      styles: internalStyles,
      theme: this.theme
    };
    return h(BaseButton, {
      attrs: __assign(__assign(__assign({}, this.$props), props), this.$attrs),
      on: this.$listeners,
      scopedSlots: this.$scopedSlots
    });
  };
  __decorate([
    Prop({ type: Boolean, default: false }),
    __metadata("design:type", Boolean)
  ], CompoundButton2.prototype, "primary", void 0);
  CompoundButton2 = __decorate([
    Component
  ], CompoundButton2);
  return CompoundButton2;
}(BaseComponent);

export { CompoundButton };
