import { _ as _slicedToArray } from '../slicedToArray-BB-AwwkK.js';
import { useState } from 'react';

function useFocus() {
  var _useState = useState(false),
      _useState2 = _slicedToArray(_useState, 2),
      focused = _useState2[0],
      setFocused = _useState2[1];

  return [focused, {
    onFocus: function onFocus() {
      return setFocused(true);
    },
    onBlur: function onBlur() {
      return setFocused(false);
    }
  }];
}

export { useFocus as default };
