"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const querystring_1 = require("querystring");
const ds_1 = require("./ds");
function reportIssue(title, body) {
    const url = `https://github.com/mixer/miix-cli/issues/new?${querystring_1.stringify({ title, body })}`;
    window.open(url, '_blank');
}
exports.reportIssue = reportIssue;
function reportHttpError(title, res) {
    reportIssue(title, ds_1.unindent(`
      ### Steps to Reproduce

      <!-- Add your reproduction steps here! -->

      ### Error

      \`\`\`
      ${res.status} from ${res.url}:
      ${res.text()}
      \`\`\`
    `));
}
exports.reportHttpError = reportHttpError;
