"use strict";

import { Switch } from "react-native";
import { useIOTheme } from "../../context";
import { IOColors } from "../../core/IOColors";
import { jsx as _jsx } from "react/jsx-runtime";
export const NativeSwitch = ({
  onValueChange,
  value,
  ...accessibility
}) => {
  const theme = useIOTheme();
  const trackColor = {
    false: IOColors[theme["switch-background-off"]],
    true: IOColors[theme["switch-background-on"]]
  };
  return /*#__PURE__*/_jsx(Switch, {
    ...accessibility,
    accessibilityRole: "switch",
    accessibilityState: {
      checked: value,
      disabled: accessibility.disabled
    },
    trackColor: trackColor,
    thumbColor: IOColors[theme["switch-thumb-color"]],
    ios_backgroundColor: IOColors[theme["switch-background-off"]],
    onValueChange: onValueChange,
    value: value
  });
};
//# sourceMappingURL=NativeSwitch.js.map