"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _wauField = _interopRequireDefault(require("../../../wau-field"));
var _createField = _interopRequireDefault(require("../../create-field"));
var _jsxRuntime = require("react/jsx-runtime");
/**
 * @zh-cn 单选 Switch
 * @en-us Single Choice Switch
 */
const ProFormSwitch = /*#__PURE__*/_react.default.forwardRef(({
  fieldProps,
  unCheckedChildren,
  checkedChildren,
  proFieldProps
}, ref) => {
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_wauField.default, {
    valueType: "switch",
    mode: "edit",
    fieldProps: {
      ...fieldProps,
      unCheckedChildren,
      checkedChildren
    },
    text: fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.checked,
    ref: ref,
    ...proFieldProps
  });
});
var _default = (0, _createField.default)(ProFormSwitch, {
  valuePropName: 'checked'
});
exports.default = _default;