import type { Params } from 'react-router';
import { type Snapshot } from 'recoil';
import { type AnyVariable, type ComponentInstance, type PyComponentInstance } from '../../types';
import { preloadDerivedValue } from './derived-variable';
/**
 * Generate a registry key for a component instance
 *
 * @param uid component instance uid
 * @param trigger whether it's a trigger key
 */
export declare function getComponentRegistryKey(uid: string, trigger?: boolean, loopInstanceUid?: string): string;
export declare function preloadServerComponent(component: PyComponentInstance, snapshot: Snapshot, params: Params<string>): ReturnType<typeof preloadDerivedValue>;
/**
 * A hook to fetch a server component
 *
 * @param name component name - specific to a given py_component
 * @param uid component uid - specific to a given *instance* of a py_component
 * @param dynamicKwargs kwargs passed into the component
 * @param loop_instance_uid loop instance uid - extra loop variable key
 */
export default function useServerComponent(name: string, uid: string, dynamicKwargs: Record<string, AnyVariable<any>>, loop_instance_uid?: string): ComponentInstance;
/**
 * A helper hook that returns a function to force a refresh of a server component
 *
 * @param name component uid
 */
export declare function useRefreshServerComponent(uid: string, loop_instance_uid?: string): () => void;
//# sourceMappingURL=use-server-component.d.ts.map