// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import { PageCallbackRouter, PageHandlerFactory, PageHandlerRemote } from './comments.mojom-webui.js';
let instance = null;
export class CommentsApiProxyImpl {
    pageCallbackRouter;
    handler;
    constructor() {
        this.pageCallbackRouter = new PageCallbackRouter();
        this.handler = new PageHandlerRemote();
        const factory = PageHandlerFactory.getRemote();
        factory.createPageHandler(this.pageCallbackRouter.$.bindNewPipeAndPassRemote(), this.handler.$.bindNewPipeAndPassReceiver());
    }
    showUi() {
        this.handler.showUI();
    }
    static getInstance() {
        return instance || (instance = new CommentsApiProxyImpl());
    }
    static setInstance(obj) {
        instance = obj;
    }
}
