"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _element = require("@wordpress/element");
var _switchCell = _interopRequireDefault(require("../mobile/bottom-sheet/switch-cell"));
var _jsxRuntime = require("react/jsx-runtime");
/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

const ToggleControl = (0, _element.memo)(({
  label,
  checked,
  help,
  instanceId,
  className,
  onChange,
  ...props
}) => {
  const id = `inspector-toggle-control-${instanceId}`;
  const helpLabel = help && typeof help === 'function' ? help(checked) : help;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_switchCell.default, {
    label: label,
    id: id,
    help: helpLabel,
    className: className,
    value: checked,
    onValueChange: onChange,
    ...props
  });
});
var _default = exports.default = ToggleControl;
//# sourceMappingURL=index.native.js.map