"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveWorkflowSurface = resolveWorkflowSurface;
exports.resolveWorkflowSurfaceForRun = resolveWorkflowSurfaceForRun;
const types_1 = require("../../platform/ticket-tracker/types");
function resolveWorkflowSurface(issue) {
    if (issue.kind === types_1.TRACKER_ITEM_KINDS.pullRequest) {
        return "pull_request";
    }
    return "issue";
}
function resolveWorkflowSurfaceForRun(input) {
    if (input.workflowState !== null) {
        return input.workflowState.workflowSurface;
    }
    return resolveWorkflowSurface(input.issue);
}
