import { OpenYoloCredentialHintOptions } from '../protocol/data' ; import { hintAvailableMessage , RpcMessageType } from '../protocol/rpc_messages' ; import { BaseRequest } from './base_request' ; /**
 * Handles the check for whether hints are available or not. It does not require
 * any user interaction, and if fails, just return as if there was no hints.
 */ export class HintAvailableRequest extends BaseRequest < boolean , OpenYoloCredentialHintOptions > { /**
     * Sends the RPC to the IFrame and waits for the result.
     */ dispatchInternal ( options ) { this . registerHandler ( RpcMessageType . hintAvailableResult , ( available ) => { this . resolve ( available ) ; this . dispose ( ) ; } ) ; this . channel . send ( hintAvailableMessage ( this . id , options ) ) ; } }