import { PluginFunction } from "vue";

//#region src/index.d.ts

/**
* Options for the VuePersistentStorageManager plugin.
*/
interface PluginOptions {
  /**
  * If true, localStorage.setItem and localStorage.removeItem will be replaced with custom functions.
  */
  watchStorage: boolean;
}
/**
* Wrapper for the StorageManager API. Provides the state of the persistent-storage permission alongside a storage estimate.
*/
declare class VuePersistentStorageManager {
  /**
  * Indicates that the StorageManager API is available.
  */
  readonly isAvailable: boolean;
  /**
  * Contains storage quota and usage information.
  */
  readonly storageEstimate: StorageEstimate;
  private _isPersistent;
  /**
  * Installs a VuePersistentStorageManager as a Vue plugin.
  */
  static install: PluginFunction<PluginOptions>;
  /**
  * Creates a new VuePersistentStorageManager instance.
  */
  constructor();
  /**
  * Indicates that persistence of localStorage has been granted.
  */
  get isPersistent(): boolean;
  /**
  * Requests persistence of localStorage.
  * @returns a Promise that resolves to true if permission has been granted.
  */
  requestPersistentStorage(): Promise<boolean>;
  private _refreshIsPersistent;
  private _refreshStorageEstimate;
  private _modifyLocalStorageFunctions;
}
declare module "vue/types/vue" {
  interface Vue {
    /**
    * Wrapper for the StorageManager API. Provides the state of the persistent-storage permission alongside a storage estimate.
    */
    $storageManager: VuePersistentStorageManager;
    /**
    * Contains storage quota and usage information.
    */
    $storageEstimate: StorageEstimate;
  }
}
declare global {
  interface Storage {
    originalSetItem?: ((key: string, value: string) => void) | undefined;
    originalRemoveItem?: ((key: string) => void) | undefined;
  }
}
//#endregion
export { PluginOptions, VuePersistentStorageManager };
//# sourceMappingURL=index.d.mts.map