"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useDisableAutofill = void 0;

var _react = require("react");

var useDisableAutofill = function useDisableAutofill(autocomplete) {
  return (0, _react.useMemo)(function () {
    return {
      // LastPass
      'data-lpignore': autocomplete === 'off' ? 'true' : undefined,

      /**
       * Generic browser autofill. This is not honoured by many modern browsers,
       * but we add it in here just in case it works anyway.
       */
      autoComplete: autocomplete
    };
  }, [autocomplete]);
};

exports.useDisableAutofill = useDisableAutofill;