import { createVNode } from 'vue';
import '../../../utils/index.mjs';
import { classNames } from '../../../utils/dom/class.mjs';

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 createVNode("label", {
    "class": classNames({
      [`${prefixCls}-item-disabled`]: disabled
    }, className)
  }, [createVNode("input", {
    "class": `${prefixCls}-item-input`,
    "type": "radio",
    "disabled": disabled,
    "checked": checked,
    "onChange": handleChange
  }, null), 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;

export { SegmentedOption as default };
//# sourceMappingURL=Options.mjs.map
