/**
 * ldesign v0.2.14
 * (c) 2022/11/2 16:16 built by swimly
 * @license MIT
 */

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var helper = require('../../chunks/helper.js');
var Vue = require('vue');
var utils_renderNode = require('../../utils/render-node.js');
var components_radio_props = require('./props.js');
var components_radio_radio = require('./radio.js');
require('lodash');
require('../../utils/helper.js');
require('lodash/camelCase');
require('../../utils/event.js');
require('../config-provider/config-receiver.js');
require('lodash/mergeWith');
require('../config-provider/context.js');
require('../../chunks/zh_CN.js');
require('../../utils/mixins.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var Vue__default = /*#__PURE__*/_interopDefaultLegacy(Vue);

var _RadioButton = Vue__default["default"].extend({
  name: "LRadioButton",
  components: {
    Radio: components_radio_radio["default"]
  },
  provide() {
    return {
      radioButton: this
    };
  },
  inject: {
    radioGroup: {
      default: void 0
    }
  },
  inheritAttrs: false,
  props: {
    ...components_radio_props.RadioProps
  },
  render() {
    const h = arguments[0];
    const {
      $props,
      $listeners,
      radioGroup
    } = this;
    const radioProps = {
      props: {
        ...$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(components_radio_radio["default"], helper.helper([{}, radioProps]), [utils_renderNode.renderContent(this, "default", "label")]);
  }
});

exports["default"] = _RadioButton;
//# sourceMappingURL=radio-button.js.map
