import { IframeHostClient } from '../../core/src/rpc/FrameClient.mjs';

class ClientsideServicesProvider {
    iframeURL;
    _frameClient;
    constructor(iframeURL){
        this.iframeURL = iframeURL;
    }
    /**
   * The frameClient is lazily initialized - we don't want to force users
   * that don't use any of its features to still download the bundle!
   * @private
   */ get frameClient() {
        this._frameClient = this._frameClient ?? new IframeHostClient(this.iframeURL);
        return this._frameClient;
    }
    call(handlerName, req) {
        return this.frameClient.call(handlerName, [
            req
        ]);
    }
    oneTapStart = (req)=>this.call('oneTapStart', req);
    oneTapSubmit = (req)=>this.call('oneTapSubmit', req);
    parsedPhoneNumber = (req)=>this.call('parsedPhoneNumber', req);
    getExamplePhoneNumber = (req)=>this.call('getExamplePhoneNumber', req);
}

export { ClientsideServicesProvider };
//# sourceMappingURL=ClientsideServicesProvider.mjs.map
