/**
 * ldesign v0.3.13
 * (c) 2023 ldesign
 * @license MIT
 */

import _defineProperty from '@babel/runtime/helpers/defineProperty';
import { isVNode, defineComponent, provide, reactive, computed, createVNode } from 'vue';
import { omit } from '../utils/helper.js';
import { useTNodeDefault } from '../hooks/tnode.js';
import props from './props.js';
import _Radio from './radio.js';
import { RadioButtonInjectionKey } from './constants.js';
import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/slicedToArray';
import 'lodash/camelCase';
import 'lodash/isUndefined';
import 'lodash/isNull';
import 'lodash/isArray';
import 'lodash/isNumber';
import 'lodash/isString';
import 'lodash/isFunction';
import 'lodash/kebabCase';
import '../utils/render-tnode.js';
import 'lodash/isEmpty';
import 'lodash/isObject';
import '@babel/runtime/helpers/toConsumableArray';
import '../hooks/useConfig.js';
import '../config-provider/useConfig.js';
import 'lodash/cloneDeep';
import '../config-provider/context.js';
import 'lodash/mergeWith';
import 'lodash/merge';
import '../_common/js/global-config/default-config.js';
import '../_common/js/global-config/locale/zh_CN.js';
import '@babel/runtime/helpers/typeof';
import '../_chunks/dep-512eb181.js';
import 'dayjs';
import '../_chunks/dep-ac28b67c.js';
import '../config-provider/type.js';
import '../form/hooks.js';
import '../hooks/useVModel.js';

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _isSlot(s) {
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
}
var _RadioButton = defineComponent({
  name: "TRadioButton",
  inheritAttrs: false,
  props: _objectSpread({}, props),
  setup: function setup(props2, _ref) {
    var attrs = _ref.attrs;
    provide(RadioButtonInjectionKey, reactive({}));
    var radioProps = computed(function () {
      var res = _objectSpread(_objectSpread({}, props2), omit(attrs, Object.keys(attrs).filter(function (key) {
        return key.startsWith("on");
      })));
      return res;
    });
    var renderContent = useTNodeDefault();
    return function () {
      var _slot;
      return createVNode(_Radio, radioProps.value, _isSlot(_slot = renderContent("default")) ? _slot : {
        "default": function _default() {
          return [_slot];
        }
      });
    };
  }
});

export { _RadioButton as default };
//# sourceMappingURL=radio-button.js.map
