"use strict";

import React from 'react';
import { Pressable, StyleSheet, Text, View } from 'react-native';
import { jsx as _jsx } from "react/jsx-runtime";
/**
 * 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__*/_jsx(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__*/_jsx(View, {
      style: styles.checkInner,
      children: /*#__PURE__*/_jsx(Text, {
        style: styles.checkGlyph,
        children: "\u2713"
      })
    })
  });
};
const styles = 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
  }
});
export default Checkbox;
//# sourceMappingURL=Checkbox.js.map