"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var FFHidden = props => {
  var {
    id,
    name,
    readOnly,
    required,
    accept,
    bsSize,
    onChange,
    hasValue,
    inputRef
  } = props;
  return /*#__PURE__*/_react.default.createElement("input", {
    style: {
      zIndex: "0",
      display: "inline",
      opacity: "0",
      visibility: "hidden"
    },
    id: id,
    name: name
    // Do not lose the form-control class
    // TODO maybe open PR on reactstrap?
    ,
    className: "form-control ".concat(bsSize != undefined ? 'form-control-' + bsSize : ''),
    ref: inputRef,
    type: "file"
    //value       = {undefined}
    ,
    onChange: onChange,
    readOnly: readOnly != undefined ? readOnly : false
    // If we receive some value on initing,
    // we have no way to assign it to this input (file are readonly)
    // So we hack this.
    // TODO Would be better to use maybe another type of hidden input,
    // keeping the <file> just for the file upload.
    ,
    required: required && !hasValue
    //valid       = {valid ? 'true' : 'false'}
    //invalid     = {!valid ? 'true' : 'false'}
    ,
    accept: accept
  });
};
var _default = FFHidden;
exports.default = _default;