"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Preview_1 = __importDefault(require("./Preview"));
const core_1 = require("../../core");
const protocol_1 = require("../../core/libs/protocol");
class Upload extends core_1.UploadModule {
    onProgress(data) {
        Preview_1.default.prototype.onProgress.call(this, data);
    }
    showPlatformUrl(appId, appType) {
        const url = this.getPlatformUrl(appId, appType);
        const link = this.execute(core_1.ModuleName.ui, protocol_1.UICmdEnum.link, url, 'Open platform');
        this.execute(core_1.ModuleName.ui, protocol_1.UICmdEnum.showInfo, {
            content: `Go to ${link} in browser to set up your ${appType.replace(/^\S/g, (s) => s.toUpperCase())}`,
        });
        return url;
    }
}
exports.default = Upload;
