import React from 'react';
import ProField from '../../../wau-field';
import createField from '../../create-field';
import { jsx as _jsx } from "react/jsx-runtime";
/**
 * @zh-cn 单选 Switch
 * @en-us Single Choice Switch
 */
const ProFormSwitch = /*#__PURE__*/React.forwardRef(({
  fieldProps,
  unCheckedChildren,
  checkedChildren,
  proFieldProps
}, ref) => {
  return /*#__PURE__*/_jsx(ProField, {
    valueType: "switch",
    mode: "edit",
    fieldProps: {
      ...fieldProps,
      unCheckedChildren,
      checkedChildren
    },
    text: fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.checked,
    ref: ref,
    ...proFieldProps
  });
});
export default createField(ProFormSwitch, {
  valuePropName: 'checked'
});