import { a as __spreadArray } from './tslib.es6-710c6267.js';
import React__default from 'react';
import { L as Label, a as LabelTypography, b as LabelColors } from './index-ed39099a.js';

var Type;

(function (Type) {
  Type[Type["PRIMARY"] = 0] = "PRIMARY";
  Type[Type["SECONDARY"] = 1] = "SECONDARY";
  Type[Type["DANGER"] = 2] = "DANGER";
  Type[Type["DISABLED"] = 3] = "DISABLED";
})(Type || (Type = {}));

var Size;

(function (Size) {
  Size[Size["BIG"] = 0] = "BIG";
  Size[Size["SMALL"] = 1] = "SMALL";
})(Size || (Size = {}));

function changeTypeToClassName(type) {
  switch (type) {
    case Type.PRIMARY:
      return 'sendbird-button--primary';

    case Type.SECONDARY:
      return 'sendbird-button--secondary';

    case Type.DANGER:
      return 'sendbird-button--danger';

    case Type.DISABLED:
      return 'sendbird-button--disabled';

    default:
      return null;
  }
}
function changeSizeToClassName(size) {
  switch (size) {
    case Size.BIG:
      return 'sendbird-button--big';

    case Size.SMALL:
      return 'sendbird-button--small';

    default:
      return null;
  }
}

function Button(_a) {
  var className = _a.className,
      _b = _a.type,
      type = _b === void 0 ? Type.PRIMARY : _b,
      _c = _a.size,
      size = _c === void 0 ? Size.BIG : _c,
      _d = _a.children,
      children = _d === void 0 ? 'Button' : _d,
      _e = _a.disabled,
      disabled = _e === void 0 ? false : _e,
      _f = _a.onClick,
      onClick = _f === void 0 ? function () {} : _f;

  var injectingClassNames = __spreadArray(__spreadArray([], Array.isArray(className) ? className : [className], true), ['sendbird-button', disabled ? 'sendbird-button__disabled' : '', changeTypeToClassName(type), changeSizeToClassName(size)], false).join(' ');

  return /*#__PURE__*/React__default.createElement("button", {
    className: injectingClassNames,
    type: "button",
    onClick: onClick,
    disabled: disabled
  }, /*#__PURE__*/React__default.createElement(Label, {
    className: "sendbird-button__text",
    type: LabelTypography.BUTTON_1,
    color: LabelColors.ONCONTENT_1
  }, children));
}
var ButtonTypes = Type;
var ButtonSizes = Size;

export { Button as B, Type as T, ButtonTypes as a, ButtonSizes as b };
//# sourceMappingURL=index-6a47d16f.js.map
