/**
 * ldesign v0.2.2
 * (c) 2022年9月20日 swimly
 * @license MIT
 */

import { h as helper } from '../../_chunks/dep-b13ef886.js';
import _defineProperty from '@babel/runtime/helpers/defineProperty';
import Vue from 'vue';
import { renderContent } from '../../utils/render-node.js';
import { RadioProps } from './props.js';
import _Radio from './radio.js';
import '@babel/runtime/helpers/typeof';
import 'lodash/camelCase';
import 'lodash/kebabCase';
import '../../utils/helper.js';
import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/slicedToArray';
import '../../utils/event.js';
import '../config-provider/config-receiver.js';
import 'lodash/mergeWith';
import 'lodash';
import '../config-provider/context.js';
import '../../_chunks/dep-a0f2090c.js';
import '../../utils/mixins.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; }
var _RadioButton = Vue.extend({
  name: "LRadioButton",
  inheritAttrs: false,
  props: _objectSpread({}, RadioProps),
  components: {
    Radio: _Radio
  },
  provide: function provide() {
    return {
      radioButton: this
    };
  },
  inject: {
    radioGroup: {
      "default": void 0
    }
  },
  render: function render() {
    var h = arguments[0];
    var $props = this.$props,
        $listeners = this.$listeners,
        radioGroup = this.radioGroup;
    var radioProps = {
      props: _objectSpread({}, $props),
      on: $listeners
    };

    if (radioGroup) {
      radioProps.props.checked = $props.value === radioGroup.value;
      radioProps.props.disabled = $props.disabled === void 0 ? radioGroup.disabled : $props.disabled;
      radioProps.props.name = radioGroup.name;
    }

    return h(_Radio, helper([{}, radioProps]), [renderContent(this, "default", "label")]);
  }
});

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