import a from "lodash";
const d = [
  // REACT
  "selected",
  "defaultValue",
  "defaultChecked",
  // LIMITED HTML PROPS
  "accept",
  "autoCapitalize",
  "autoComplete",
  "autoCorrect",
  "autoFocus",
  "checked",
  "disabled",
  "enterKeyHint",
  "form",
  "id",
  "inputMode",
  "lang",
  "list",
  "max",
  "maxLength",
  "min",
  "minLength",
  "multiple",
  "name",
  "pattern",
  "placeholder",
  "readOnly",
  "required",
  "step",
  "title",
  "type",
  "value"
], h = [
  // EVENTS
  // keyboard
  "onKeyDown",
  "onKeyPress",
  "onKeyUp",
  // focus
  "onFocus",
  "onBlur",
  // form
  "onChange",
  "onInput",
  // mouse
  "onClick",
  "onContextMenu",
  "onDrag",
  "onDragEnd",
  "onDragEnter",
  "onDragExit",
  "onDragLeave",
  "onDragOver",
  "onDragStart",
  "onDrop",
  "onMouseDown",
  "onMouseEnter",
  "onMouseLeave",
  "onMouseMove",
  "onMouseOut",
  "onMouseOver",
  "onMouseUp",
  // selection
  "onSelect",
  // touch
  "onTouchCancel",
  "onTouchEnd",
  "onTouchMove",
  "onTouchStart"
], g = [...d, ...h], p = ["alt", "height", "src", "srcSet", "width", "loading"], M = (e, n = {}) => {
  const { htmlProps: s = g, includeAria: o = !0 } = n, t = {}, u = {};
  return a.forEach(e, (c, r) => {
    const l = o && (/^aria-.*$/.test(r) || r === "role"), i = a.includes(s, r) || l ? t : u;
    i[r] = c;
  }), [t, u];
}, y = (e, n) => e && n, D = (e, n) => e && e !== !0 && `${e} ${n}`, f = (e, n) => {
  const { handledProps: s = [] } = e;
  return Object.keys(n).reduce((o, t) => (t === "childKey" || t === "innerRef" || s.indexOf(t) === -1 && (o[t] = n[t]), o), {});
};
export {
  f as getUnhandledProps,
  p as htmlImageProps,
  d as htmlInputAttrs,
  h as htmlInputEvents,
  g as htmlInputProps,
  M as partitionHTMLProps,
  y as useKeyOnly,
  D as useValueAndKey
};
