'use strict';

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

var vue = require('vue');
require('../../../utils/index.cjs');
var _class = require('../../../utils/dom/class.cjs');

const SegmentedOption = (props, {
  slots,
  emit
}) => {
  const {
    value,
    disabled,
    payload,
    title,
    prefixCls,
    label = slots.label,
    checked,
    className
  } = props;
  const handleChange = (event) => {
    if (disabled)
      return;
    emit("change", event, value);
  };
  return vue.createVNode("label", {
    "class": _class.classNames({
      [`${prefixCls}-item-disabled`]: disabled
    }, className)
  }, [vue.createVNode("input", {
    "class": `${prefixCls}-item-input`,
    "type": "radio",
    "disabled": disabled,
    "checked": checked,
    "onChange": handleChange
  }, null), vue.createVNode("div", {
    "class": `${prefixCls}-item-label`,
    "title": typeof title === "string" ? title : ""
  }, [typeof label === "function" ? label({
    value,
    disabled,
    payload,
    title
  }) : label != null ? label : value])]);
};
SegmentedOption.inheritAttrs = false;

exports.default = SegmentedOption;
//# sourceMappingURL=Options.cjs.map
