"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPayloadFromUi = isPayloadFromUi;
exports.isPayloadFromCli = isPayloadFromCli;
exports.isNewTestPayloadFromWebApp = isNewTestPayloadFromWebApp;
exports.isEditTestPayloadFromWebApp = isEditTestPayloadFromWebApp;
exports.isNewTestPayloadFromDesktopApp = isNewTestPayloadFromDesktopApp;
exports.isEditTestPayloadFromDesktopApp = isEditTestPayloadFromDesktopApp;
exports.isNewTestPayloadFromCli = isNewTestPayloadFromCli;
exports.isEditTestPayloadFromCli = isEditTestPayloadFromCli;
function isPayloadFromUi(payload) {
    return payload.sender === 'webapp' || payload.sender === 'mabltron';
}
function isPayloadFromCli(payload) {
    return payload.sender === 'cli' || !isPayloadFromUi(payload);
}
function isNewTestPayloadFromWebApp(payload) {
    return payload.sender === 'webapp' && payload.testId === undefined;
}
function isEditTestPayloadFromWebApp(payload) {
    return payload.sender === 'webapp' && payload.testId !== undefined;
}
function isNewTestPayloadFromDesktopApp(payload) {
    return payload.sender === 'mabltron' && payload.testId === undefined;
}
function isEditTestPayloadFromDesktopApp(payload) {
    return payload.sender === 'mabltron' && payload.testId !== undefined;
}
function isNewTestPayloadFromCli(payload) {
    return isPayloadFromCli(payload) && payload.testName !== undefined;
}
function isEditTestPayloadFromCli(payload) {
    return isPayloadFromCli(payload) && payload.testId !== undefined;
}
