import { ProtoComponentDef } from './types.js'; import { Logger } from '@nu-art/ts-common'; import { ComponentSync } from '../ComponentSync.js'; export declare class UrlState> extends Logger { private keys; constructor(keys: Def['props']['keys'], _component: ComponentSync); /** * Generates an object connection each query param key given in the props to its current value as read from the URL */ private getQueryParamResultsObject; /** * Will set a value in the URL hash for a given key. * @param key * @param value */ setQueryParam(key: K, value: Def['queryParamDef'][K]): void; /** * Retrieves the value of the specified query parameter. * * @param {K} key - The query parameter key. * @return {Def['queryParamDef'][K] | undefined} - The value of the specified query parameter, or undefined if it doesn't exist. */ getQueryParam(key: K): Readonly | undefined; /** * Retrieves the value of the specified query parameter from the URL. * * @param {K} key - The key of the query parameter to retrieve. Must be one of the defined query parameter keys. * @param {Def.queryParamDef[K]} defaultValue - The default value to return if the query parameter is not found in the URL. * @returns {Def.queryParamDef[K]} - The value of the specified query parameter, or the default value if not found. */ getQueryParam(key: K, defaultValue: Def['queryParamDef'][K]): Readonly; /** * Clears the value of a query param by a given key * @param key */ deleteQueryParam(key: Def['queryParamKeys']): void; /** * Will merge the given query object into the URL. * @param query */ setQueryParams(query: Partial): void; }