import { TelnyxRTC, IClientOptions } from '@telnyx/webrtc'; declare type TokenCredential = { login_token: string; debug?: boolean; }; declare type UsernameCredential = { login: string; password: string; debug?: boolean; }; export declare type CredentialOptions = TokenCredential | UsernameCredential; /** * Creates and connects a client after mount. Initially returns undefined. * Credential values replace the client; other options are captured at mount. * Unmounting disconnects the client, including any active calls. * * Subscribe in an effect, not during render: * ```jsx * const client = useTelnyxRTC({ login_token }); * useEffect(() => { * if (!client) return; * const onReady = () => console.log('client ready'); * client.on('telnyx.ready', onReady); * return () => { client.off('telnyx.ready', onReady); }; * }, [client]); * ``` */ declare function useTelnyxRTC(credentialParam: CredentialOptions, clientOptions?: Partial): TelnyxRTC | undefined; export default useTelnyxRTC;