"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.playbackError = exports.assertPlayback = exports.scriptError = exports.assertScript = void 0;
const error_js_1 = require("./error.js");
function assertScript(condition, message, details) {
    if (!condition) {
        throw scriptError(message, details);
    }
}
exports.assertScript = assertScript;
function scriptError(message, details) {
    return (0, error_js_1.createError)({
        code: 'InvalidScript',
        message,
        details,
        retry: false,
    });
}
exports.scriptError = scriptError;
function assertPlayback(condition, message, details) {
    if (!condition) {
        throw playbackError(message, details);
    }
}
exports.assertPlayback = assertPlayback;
function playbackError(message, details) {
    return (0, error_js_1.createError)({
        code: 'PlaybackError',
        message,
        details,
        retry: true,
    });
}
exports.playbackError = playbackError;
//# sourceMappingURL=assert.js.map