"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactNative = require("react-native");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
 * Minimal RN-native checkbox replacement for the user-list multi-select.
 * Avoids pulling in `@react-native-community/checkbox` (legacy native
 * module that needs the Metro shim) — the UI footprint is one tap-target
 * with a check glyph, so a plain Pressable does the job.
 */
const Checkbox = ({
  value,
  onValueChange,
  disabled,
  color = '#0052cd'
}) => {
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
    accessibilityRole: "checkbox",
    accessibilityState: {
      checked: value,
      disabled: !!disabled
    },
    disabled: disabled,
    onPress: () => onValueChange(!value),
    style: [styles.box, {
      borderColor: color,
      backgroundColor: value ? color : 'transparent'
    }, disabled && styles.disabled],
    children: value && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
      style: styles.checkInner,
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
        style: styles.checkGlyph,
        children: "\u2713"
      })
    })
  });
};
const styles = _reactNative.StyleSheet.create({
  box: {
    width: 18,
    height: 18,
    borderWidth: 1.5,
    borderRadius: 3,
    alignItems: 'center',
    justifyContent: 'center'
  },
  checkInner: {
    alignItems: 'center',
    justifyContent: 'center'
  },
  checkGlyph: {
    color: '#fff',
    fontSize: 12,
    fontWeight: '700',
    lineHeight: 14
  },
  disabled: {
    opacity: 0.4
  }
});
var _default = exports.default = Checkbox;
//# sourceMappingURL=Checkbox.js.map