import { TrackedMap } from 'tracked-built-ins'; import { PluginPreferenceFor, PluginPreferences, TablePreferencesData } from "./interfaces/index.js"; import { PreferencesAdapter as Adapter } from "./interfaces/index.js"; declare class TablePreferences { private key; private adapter?; storage: TrackedPreferences; constructor(key: string, adapter?: Adapter | undefined); hasAdapter(): boolean; getIsAtDefault(): boolean; /** * Passes a JSON-compatible structure to `adapter.persist` * * This structure could be stored in a remote database or * local storage. The `adpater.restore` method can be used to restore * this structure back in to the {@link TrackedPreferences } */ /** * Passes a JSON-compatible structure to `adapter.persist` * * This structure could be stored in a remote database or * local storage. The `adpater.restore` method can be used to restore * this structure back in to the {@link TrackedPreferences } */ persist(): void | undefined; /** * Using the `adapter.restore` method, convert the JSON structure * to {@link TrackedPreferences } */ /** * Using the `adapter.restore` method, convert the JSON structure * to {@link TrackedPreferences } */ restore(adapter: Adapter): void; } /** * @public * * The API for reactively interacting with preferences */ declare class TrackedPreferences { plugins: Map>; get isAtDefault(): boolean; forPlugin(name: string): TrackedPluginPrefs; serialize(): TablePreferencesData; restore(data: TablePreferencesData): void; } declare class TrackedPluginPrefs { table: TrackedMap; columns: Map>; get isAtDefault(): boolean; forColumn: (key: string) => TrackedMap; serialize(): PluginPreferenceFor; restore(data: PluginPreferences): void; } export { TablePreferences };