"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 }; }
/**
 * Reusable setting row component with switch
 * Extracted from PrivacySettingsScreen for reuse across settings screens
 */
const SettingRow = ({
  title,
  description,
  value,
  onValueChange,
  disabled = false,
  textColor,
  mutedTextColor,
  borderColor
}) => {
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
    style: [styles.settingRow, borderColor ? {
      borderBottomColor: borderColor
    } : undefined],
    children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
      style: styles.settingInfo,
      children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
        style: [styles.settingTitle, textColor ? {
          color: textColor
        } : undefined],
        children: title
      }), description && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
        style: [styles.settingDescription, mutedTextColor ? {
          color: mutedTextColor
        } : undefined],
        children: description
      })]
    }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Switch, {
      value: value,
      onValueChange: onValueChange,
      disabled: disabled,
      trackColor: {
        false: '#767577',
        true: '#d169e5'
      },
      thumbColor: value ? '#fff' : '#f4f3f4'
    })]
  });
};
const styles = _reactNative.StyleSheet.create({
  settingRow: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
    paddingVertical: 16,
    borderBottomWidth: 1
  },
  settingInfo: {
    flex: 1,
    marginRight: 16
  },
  settingTitle: {
    fontSize: 16,
    fontWeight: '500',
    marginBottom: 4
  },
  settingDescription: {
    fontSize: 14,
    opacity: 0.7
  }
});
var _default = exports.default = /*#__PURE__*/_react.default.memo(SettingRow);
//# sourceMappingURL=SettingRow.js.map