import "../styles/reset.css";
import "./radio.less";
import { EMPTY_OBJ as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_EMPTY_OBJ__, PropTypes as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__, classes as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_classes__, isEmptyObj as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_isEmptyObj__, useFormItem as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_useFormItem__, 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__, getCurrentInstance as __WEBPACK_EXTERNAL_MODULE_vue_getCurrentInstance__, inject as __WEBPACK_EXTERNAL_MODULE_vue_inject__, nextTick as __WEBPACK_EXTERNAL_MODULE_vue_nextTick__, onBeforeUnmount as __WEBPACK_EXTERNAL_MODULE_vue_onBeforeUnmount__, onMounted as __WEBPACK_EXTERNAL_MODULE_vue_onMounted__, provide as __WEBPACK_EXTERNAL_MODULE_vue_provide__, ref as __WEBPACK_EXTERNAL_MODULE_vue_ref__, watch as __WEBPACK_EXTERNAL_MODULE_vue_watch__ } from "vue";
import { func as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a_func__ } from "vue-types";
import { usePrefix as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__ } from "../config-provider";

;// 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;
}

;// ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
function _arrayWithHoles(r) {
  if (Array.isArray(r)) return r;
}

;// ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
function _iterableToArrayLimit(r, l) {
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  if (null != t) {
    var e,
      n,
      i,
      u,
      a = [],
      f = !0,
      o = !1;
    try {
      if (i = (t = t.call(r)).next, 0 === l) {
        if (Object(t) !== t) return;
        f = !1;
      } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
    } catch (r) {
      o = !0, n = r;
    } finally {
      try {
        if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
      } finally {
        if (o) throw n;
      }
    }
    return a;
  }
}

;// ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
function _arrayLikeToArray(r, a) {
  (null == a || a > r.length) && (a = r.length);
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
  return n;
}

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

function _unsupportedIterableToArray(r, a) {
  if (r) {
    if ("string" == typeof r) return _arrayLikeToArray(r, a);
    var t = {}.toString.call(r).slice(8, -1);
    return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
  }
}

;// ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
function _nonIterableRest() {
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}

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




function _slicedToArray(r, e) {
  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
}

;// external "vue-types"

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

;// ../../packages/radio/src/common.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 radioGroupKey = Symbol('RadioGroup');
function useFocus() {
  var isFocused = __WEBPACK_EXTERNAL_MODULE_vue_ref__(false);
  var blur = function blur() {
    isFocused.value = false;
  };
  var focus = function focus() {
    isFocused.value = true;
  };
  return [isFocused, {
    blur: blur,
    focus: focus
  }];
}
var useRadio = function useRadio() {
  var currentInstance = __WEBPACK_EXTERNAL_MODULE_vue_getCurrentInstance__();
  var props = currentInstance.props,
    emit = currentInstance.emit;
  var radioGroup = __WEBPACK_EXTERNAL_MODULE_vue_inject__(radioGroupKey, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_EMPTY_OBJ__);
  var isGroup = !__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_isEmptyObj__(radioGroup);
  var isChecked = __WEBPACK_EXTERNAL_MODULE_vue_ref__(false);
  var isPrechecking = __WEBPACK_EXTERNAL_MODULE_vue_ref__(false);
  var size = __WEBPACK_EXTERNAL_MODULE_vue_ref__('default');
  // 禁用状态
  var isDisabled = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
    if (isGroup && radioGroup.props.disabled) {
      return true;
    }
    return props.disabled;
  });
  // 响应modelValue
  if (isGroup) {
    size.value = radioGroup.props.size;
    __WEBPACK_EXTERNAL_MODULE_vue_watch__(function () {
      return radioGroup.props.modelValue;
    }, function (modelValue) {
      isChecked.value = modelValue === props.label;
    }, {
      immediate: true
    });
  } else {
    __WEBPACK_EXTERNAL_MODULE_vue_watch__(function () {
      return props.modelValue;
    }, function (modelValue) {
      if (modelValue === '') {
        return;
      }
      isChecked.value = modelValue === props.label;
    }, {
      immediate: true
    });
  }
  var setChecked = function setChecked() {
    var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
    isChecked.value = value;
  };
  // 值更新
  var handleChange = function handleChange(event) {
    if (isDisabled.value || isPrechecking.value) {
      return;
    }
    var $targetInput = event.target;
    var newValue = $targetInput.checked;
    Promise.resolve(isGroup ? radioGroup.props.beforeChange(newValue) : props.beforeChange(newValue)).then(function (result) {
      if (result) {
        isChecked.value = $targetInput.checked;
        var nextValue = isChecked.value ? props.label : '';
        emit('update:modelValue', nextValue);
        emit('change', nextValue);
        // 更新 radio-group
        if (isGroup) {
          radioGroup.handleChange(currentInstance.proxy);
        }
        __WEBPACK_EXTERNAL_MODULE_vue_nextTick__(function () {
          // 选中状态保持同步
          if ($targetInput.checked !== isChecked.value) {
            $targetInput.checked = isChecked.value;
          }
        });
        return Promise.resolve(true);
      }
      return Promise.reject();
    })["catch"](function () {
      $targetInput.checked = isChecked.value;
    })["finally"](function () {
      isPrechecking.value = false;
    });
  };
  __WEBPACK_EXTERNAL_MODULE_vue_onMounted__(function () {
    if (isGroup) {
      radioGroup.register(currentInstance.proxy);
    }
  });
  __WEBPACK_EXTERNAL_MODULE_vue_onBeforeUnmount__(function () {
    if (isGroup) {
      radioGroup.unregister(currentInstance.proxy);
    }
  });
  return {
    size: size,
    isChecked: isChecked,
    isDisabled: isDisabled,
    setChecked: setChecked,
    handleChange: handleChange
  };
};
;// ../../packages/radio/src/radio.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 radioProps = {
  name: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string.def(''),
  label: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.oneOfType([__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number]).isRequired,
  modelValue: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.oneOfType([__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number]).def(''),
  checked: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
  disabled: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
  beforeChange: __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a_func__().def(function () {
    return true;
  })
};
/* harmony default export */ const src_radio = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'Radio',
  props: radioProps,
  emits: {
    'update:modelValue': function updateModelValue(value) {
      return value !== undefined;
    },
    change: function change(value) {
      return value !== undefined;
    }
  },
  setup: function setup() {
    var _useFocus = useFocus(),
      _useFocus2 = _slicedToArray(_useFocus, 2),
      isFocused = _useFocus2[0],
      _useFocus2$ = _useFocus2[1],
      handleBlur = _useFocus2$.blur,
      handleFocus = _useFocus2$.focus;
    var _useRadio = useRadio(),
      size = _useRadio.size,
      isChecked = _useRadio.isChecked,
      isDisabled = _useRadio.isDisabled,
      setChecked = _useRadio.setChecked,
      handleChange = _useRadio.handleChange;
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    return {
      size: size,
      isFocused: isFocused,
      isChecked: isChecked,
      isDisabled: isDisabled,
      setChecked: setChecked,
      handleBlur: handleBlur,
      handleFocus: handleFocus,
      handleChange: handleChange,
      resolveClassName: resolveClassName
    };
  },
  render: function render() {
    var _this = this;
    var radioClass = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_classes__(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(this.resolveClassName('radio')), true), "".concat(this.resolveClassName('radio'), "-").concat(this.size), true), 'is-focused', this.isFocused), 'is-disabled', this.isDisabled), 'is-checked', this.isChecked));
    var renderLabel = function renderLabel() {
      if (!_this.label && !_this.$slots["default"]) {
        return null;
      }
      return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("span", {
        "class": "".concat(_this.resolveClassName('radio-label'))
      }, [_this.$slots["default"] ? _this.$slots["default"]() : _this.label]);
    };
    return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("label", {
      "class": radioClass,
      "tabindex": "0"
    }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("input", {
      "class": "".concat(this.resolveClassName('radio-input')),
      "checked": this.isChecked,
      "disabled": this.isDisabled,
      "tabindex": "0",
      "type": "radio",
      "value": this.label,
      "onBlur": this.handleBlur,
      "onChange": this.handleChange,
      "onFocus": this.handleFocus
    }, null), renderLabel()]);
  }
}));
;// ../../packages/radio/src/radio-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 radioButtonProps = {
  name: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string.def(''),
  label: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.oneOfType([__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number]).isRequired,
  modelValue: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.oneOfType([__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number]).def(''),
  checked: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
  disabled: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
  size: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.size(),
  beforeChange: __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a_func__().def(function () {
    return true;
  })
};
/* harmony default export */ const radio_button = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'RadioButton',
  props: radioButtonProps,
  emits: {
    'update:modelValue': function updateModelValue(value) {
      return value !== undefined;
    },
    change: function change(value) {
      return value !== undefined;
    }
  },
  setup: function setup() {
    var _useFocus = useFocus(),
      _useFocus2 = _slicedToArray(_useFocus, 2),
      isFocused = _useFocus2[0],
      _useFocus2$ = _useFocus2[1],
      handleBlur = _useFocus2$.blur,
      handleFocus = _useFocus2$.focus;
    var _useRadio = useRadio(),
      size = _useRadio.size,
      isChecked = _useRadio.isChecked,
      isDisabled = _useRadio.isDisabled,
      setChecked = _useRadio.setChecked,
      handleChange = _useRadio.handleChange;
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    return {
      isFocused: isFocused,
      size: size,
      isChecked: isChecked,
      isDisabled: isDisabled,
      setChecked: setChecked,
      handleBlur: handleBlur,
      handleFocus: handleFocus,
      handleChange: handleChange,
      resolveClassName: resolveClassName
    };
  },
  render: function render() {
    var _this = this;
    var radioClass = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_classes__(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(this.resolveClassName('radio-button')), true), "".concat(this.resolveClassName('radio-button'), "-").concat(this.size), true), 'is-focused', this.isFocused), 'is-disabled', this.isDisabled), 'is-checked', this.isChecked));
    var renderLabel = function renderLabel() {
      if (!_this.label && !_this.$slots["default"]) {
        return null;
      }
      return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
        "class": "".concat(_this.resolveClassName('radio-button-label'))
      }, [_this.$slots["default"] ? _this.$slots["default"]() : _this.label]);
    };
    return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("label", {
      "class": radioClass,
      "tabindex": "0"
    }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("input", {
      "class": "".concat(this.resolveClassName('radio-button-input')),
      "checked": this.isChecked,
      "disabled": this.isDisabled,
      "tabindex": "0",
      "type": "radio",
      "value": this.label,
      "onBlur": this.handleBlur,
      "onChange": this.handleChange,
      "onFocus": this.handleFocus
    }, null), renderLabel()]);
  }
}));
;// ../../packages/radio/src/radio-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.
 */





var radioGroupProps = {
  name: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string.def(''),
  modelValue: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.oneOfType([__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number]),
  disabled: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool,
  withValidate: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(true),
  type: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.oneOf(['tab', 'capsule', 'card']).def('tab'),
  size: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.size(),
  beforeChange: __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a_func__().def(function () {
    return true;
  })
};
/* harmony default export */ const radio_group = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'RadioGroup',
  props: radioGroupProps,
  emits: {
    'update:modelValue': function updateModelValue(value) {
      return value !== undefined;
    },
    change: function change(value) {
      return value !== undefined;
    }
  },
  setup: function setup(props, context) {
    var formItem = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_useFormItem__();
    var radioInstanceList = [];
    var register = function register(radioContext) {
      radioInstanceList.push(radioContext);
    };
    var unregister = function unregister(radioContext) {
      var index = radioInstanceList.indexOf(radioContext);
      if (index > -1) {
        radioInstanceList.splice(index, 1);
      }
    };
    var handleChange = function handleChange(checkedRadioInstance) {
      var nextValue = checkedRadioInstance.label;
      radioInstanceList.forEach(function (radioInstance) {
        if (radioInstance !== checkedRadioInstance) {
          radioInstance.setChecked(false);
        }
      });
      context.emit('update:modelValue', nextValue);
      context.emit('change', nextValue);
    };
    __WEBPACK_EXTERNAL_MODULE_vue_provide__(radioGroupKey, {
      props: props,
      register: register,
      unregister: unregister,
      handleChange: handleChange
    });
    __WEBPACK_EXTERNAL_MODULE_vue_watch__(function () {
      return props.modelValue;
    }, function () {
      if (props.withValidate) {
        var _formItem$validate;
        formItem === null || formItem === void 0 || (_formItem$validate = formItem.validate) === null || _formItem$validate === void 0 || _formItem$validate.call(formItem, 'change');
      }
    });
    __WEBPACK_EXTERNAL_MODULE_vue_onMounted__(function () {
      if (props.modelValue === '') {
        return;
      }
      radioInstanceList.forEach(function (radioInstance) {
        radioInstance.setChecked(radioInstance.label === props.modelValue);
      });
    });
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    return {
      resolveClassName: resolveClassName
    };
  },
  render: function render() {
    var _this$$slots;
    return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "class": ["".concat(this.resolveClassName('radio-group')), "".concat(this.resolveClassName("radio-".concat(this.type)))]
    }, [(_this$$slots = this.$slots) === null || _this$$slots === void 0 ? void 0 : _this$$slots["default"]()]);
  }
}));
;// ../../packages/radio/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 BkRadio = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstallProps__(src_radio, {
  Group: radio_group,
  Button: radio_button
});
/* harmony default export */ const src = (BkRadio);

export { BkRadio, radio_button as BkRadioButton, radio_group as BkRadioGroup, src as default };
