import "../styles/reset.css";
import "./button.less";
import { PropTypes as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__, classes as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_classes__, withInstallProps as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstallProps__ } from "../shared";
import { computed as __WEBPACK_EXTERNAL_MODULE_vue_computed__, createVNode as __WEBPACK_EXTERNAL_MODULE_vue_createVNode__, defineComponent as __WEBPACK_EXTERNAL_MODULE_vue_defineComponent__, mergeProps as __WEBPACK_EXTERNAL_MODULE_vue_mergeProps__, ref as __WEBPACK_EXTERNAL_MODULE_vue_ref__ } from "vue";
import { usePrefix as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__ } from "../config-provider";
import { BkLoadingSize as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a_BkLoadingSize__, default as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a_default__ } from "../loading";
import "../loading/loading.less";

;// external "../shared"

;// external "vue"

;// ../../node_modules/@babel/runtime/helpers/esm/typeof.js
function _typeof(o) {
  "@babel/helpers - typeof";

  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
    return typeof o;
  } : function (o) {
    return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  }, _typeof(o);
}

;// ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js

function toPrimitive(t, r) {
  if ("object" != _typeof(t) || !t) return t;
  var e = t[Symbol.toPrimitive];
  if (void 0 !== e) {
    var i = e.call(t, r || "default");
    if ("object" != _typeof(i)) return i;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return ("string" === r ? String : Number)(t);
}

;// ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js


function toPropertyKey(t) {
  var i = toPrimitive(t, "string");
  return "symbol" == _typeof(i) ? i : i + "";
}

;// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js

function _defineProperty(e, r, t) {
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
    value: t,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[r] = t, e;
}

;// external "../config-provider"

;// external "../loading"

;// external "../loading/loading.less"

;// ../../packages/button/src/button.tsx


/**
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */






var btnSizes = ['', 'small', 'large'];
var buttonProps = {
  theme: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.theme(),
  hoverTheme: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.theme(),
  size: {
    type: String,
    "default": btnSizes[0]
  },
  title: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string,
  icon: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string,
  iconRight: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string,
  disabled: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool,
  loading: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool,
  loadingMode: {
    type: String,
    "default": 'default'
  },
  outline: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool,
  text: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool,
  selected: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool,
  // circle: PropTypes.bool,
  nativeType: {
    type: String,
    "default": 'button'
  }
};
/* harmony default export */ const src_button = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'Button',
  props: buttonProps,
  emits: ['click', 'mouseover'],
  setup: function setup(props, _ref) {
    var _slots$default;
    var slots = _ref.slots,
      emit = _ref.emit;
    var isHover = __WEBPACK_EXTERNAL_MODULE_vue_ref__(false);
    var showSlot = (_slots$default = slots["default"]) !== null && _slots$default !== void 0 ? _slots$default : false;
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    var btnClsPrefix = resolveClassName('button');
    var isText = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      return props.text && !props.hoverTheme;
    });
    var btnCls = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      var hoverTheme = props.hoverTheme ? "".concat(btnClsPrefix, "-hover-").concat(props.hoverTheme) : '';
      var btnThemeCls = props.theme ? "".concat(btnClsPrefix, "-").concat(props.theme) : '';
      var themeCls = props.hoverTheme ? '' : btnThemeCls;
      return __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_classes__(_defineProperty(_defineProperty({
        'is-disabled': props.disabled,
        'is-outline': props.outline,
        'is-text': isText.value,
        'is-loading': props.loading,
        'is-selected': props.selected
      }, "".concat(btnClsPrefix, "-").concat(props.size), props.size && btnSizes.includes(props.size)), 'no-slot', !showSlot), "".concat(themeCls, " ").concat(btnClsPrefix, " ").concat(hoverTheme));
    });
    var loadingTheme = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      if (props.text || props.outline || props.hoverTheme) {
        if (isHover.value && !props.text) return 'white';
        if (props.text && props.disabled) return;
        return props.hoverTheme || props.theme;
      }
      return !props.theme ? undefined : 'white';
    });
    var loadingSize = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      return isText.value || props.size === __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a_BkLoadingSize__.Small ? __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a_BkLoadingSize__.Mini : __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a_BkLoadingSize__.Small;
    });
    var handleClick = function handleClick(e) {
      if (props.loading) return;
      /**
       * Success event.
       * @event click
       */
      emit('click', e);
    };
    var handleMouseOver = function handleMouseOver(e) {
      isHover.value = true;
      emit('mouseover', e);
    };
    var handleMouseout = function handleMouseout() {
      isHover.value = false;
    };
    return function () {
      var _slots$default2;
      return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("button", {
        "class": btnCls.value,
        "disabled": props.disabled,
        "title": props.title,
        "type": props.nativeType,
        "onClick": handleClick,
        "onMouseleave": handleMouseout,
        "onMouseover": handleMouseOver
      }, [props.loading && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a_default__, __WEBPACK_EXTERNAL_MODULE_vue_mergeProps__({
        "class": "".concat(btnClsPrefix, "-loading"),
        "mode": props.loadingMode,
        "size": loadingSize.value,
        "loading": true
      }, loadingTheme.value ? {
        theme: loadingTheme.value
      } : {}), null), slots["default"] && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("span", {
        "class": "".concat(btnClsPrefix, "-text")
      }, [(_slots$default2 = slots["default"]) === null || _slots$default2 === void 0 ? void 0 : _slots$default2.call(slots)])]);
    };
  }
}));
;// ../../packages/button/src/button-group.tsx


/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */



/* harmony default export */ const button_group = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'ButtonGroup',
  props: {
    size: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.size()
  },
  setup: function setup(props, ctx) {
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    var btnGroupCls = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      return __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_classes__(_defineProperty({}, "".concat(resolveClassName("button-group-".concat(props.size))), !!props.size), "".concat(resolveClassName('button-group')));
    });
    return function () {
      var _ctx$slots$default, _ctx$slots;
      return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
        "class": btnGroupCls.value
      }, [(_ctx$slots$default = (_ctx$slots = ctx.slots)["default"]) === null || _ctx$slots$default === void 0 ? void 0 : _ctx$slots$default.call(_ctx$slots)]);
    };
  }
}));
;// ../../packages/button/src/index.ts
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */



var BkButton = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstallProps__(src_button, {
  ButtonGroup: button_group
});
/* harmony default export */ const src = (BkButton);

export { BkButton, button_group as BkButtonGroup, src as default };
