text: 'use strict';
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  
  var _isEvent = require('./isEvent');
  
  var _isEvent2 = _interopRequireDefault(_isEvent);
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  var getSelectedValues = function getSelectedValues(options) {
    var result = [];
    if (options) {
      for (var index = 0; index < options.length; index++) {
        var option = options[index];
        if (option.selected) {
          result.push(option.value);
        }
      }
    }
    return result;
  };
  
  var getValue = function getValue(event, isReactNative) {
    if ((0, _isEvent2.default)(event)) {
      if (!isReactNative && event.nativeEvent && event.nativeEvent.text !== undefined) {
        return event.nativeEvent.text;
      }
      if (isReactNative && event.nativeEvent !== undefined) {
        return event.nativeEvent.text;
      }
      var _event$target = event.target;
      var type = _event$target.type;
      var value = _event$target.value;
      var checked = _event$target.checked;
      var files = _event$target.files;
      var dataTransfer = event.dataTransfer;
  
      if (type === 'checkbox') {
        return checked;
      }
      if (type === 'file') {
        return files || dataTransfer && dataTransfer.files;
      }
      if (type === 'select-multiple') {
        return getSelectedValues(event.target.options);
      }
      return value;
    }
    return event;
  };
  
  exports.default = getValue;