"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.RadioItemBase = exports.RadioItem = exports.default = void 0;

var _kind = _interopRequireDefault(require("@enact/core/kind"));

var _react = _interopRequireDefault(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _ToggleIcon = _interopRequireDefault(require("../ToggleIcon"));

var _ToggleItem = _interopRequireDefault(require("../ToggleItem"));

var _RadioItem = _interopRequireDefault(require("./RadioItem.less"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

/**
 * Renders an `Item` with a radio-dot icon.
 *
 * @class RadioItem
 * @memberof moonstone/RadioItem
 * @extends moonstone/ToggleItem.ToggleItem
 * @ui
 * @public
 */
var RadioItemBase = (0, _kind.default)({
  name: 'RadioItem',
  propTypes:
  /** @lends moonstone/RadioItem.RadioItem.prototype */
  {
    /**
     * Customizes the component by mapping the supplied collection of CSS class names to the
     * corresponding internal Elements and states of this component.
     *
     * The following classes are supported:
     *
     * * `radioItem` - The root class name
     *
     * @type {Object}
     * @public
     */
    css: _propTypes.default.object
  },
  styles: {
    css: _RadioItem.default,
    className: 'radioItem',
    publicClassNames: ['radioItem']
  },
  render: function render(props) {
    return _react.default.createElement(_ToggleItem.default, _extends({
      "data-webos-voice-intent": "SelectRadioItem"
    }, props, {
      css: props.css,
      iconComponent: _react.default.createElement(_ToggleIcon.default, {
        css: _RadioItem.default
      })
    }));
  }
});
exports.RadioItemBase = exports.RadioItem = RadioItemBase;
var _default = RadioItemBase;
exports.default = _default;