"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.NativeSwitch = void 0;
var _reactNative = require("react-native");
var _context = require("../../context");
var _IOColors = require("../../core/IOColors");
var _jsxRuntime = require("react/jsx-runtime");
const NativeSwitch = ({
  onValueChange,
  value,
  ...accessibility
}) => {
  const theme = (0, _context.useIOTheme)();
  const trackColor = {
    false: _IOColors.IOColors[theme["switch-background-off"]],
    true: _IOColors.IOColors[theme["switch-background-on"]]
  };
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Switch, {
    ...accessibility,
    accessibilityRole: "switch",
    accessibilityState: {
      checked: value,
      disabled: accessibility.disabled
    },
    trackColor: trackColor,
    thumbColor: _IOColors.IOColors[theme["switch-thumb-color"]],
    ios_backgroundColor: _IOColors.IOColors[theme["switch-background-off"]],
    onValueChange: onValueChange,
    value: value
  });
};
exports.NativeSwitch = NativeSwitch;
//# sourceMappingURL=NativeSwitch.js.map