"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isJavaScriptDescriptor = isJavaScriptDescriptor;
exports.isLegacyInlineJavaScriptDescriptor = isLegacyInlineJavaScriptDescriptor;
exports.isLegacyReusableSnippetDescriptor = isLegacyReusableSnippetDescriptor;
exports.isInlineSnippetDescriptor = isInlineSnippetDescriptor;
exports.isReusableSnippetDescriptor = isReusableSnippetDescriptor;
function isJavaScriptDescriptor(value) {
    return (isLegacyInlineJavaScriptDescriptor(value) ||
        isLegacyReusableSnippetDescriptor(value) ||
        isInlineSnippetDescriptor(value) ||
        isReusableSnippetDescriptor(value));
}
function isLegacyInlineJavaScriptDescriptor(value) {
    return (value && typeof value === 'object' && typeof value.encodedJS === 'string');
}
function isLegacyReusableSnippetDescriptor(value) {
    return (value &&
        typeof value === 'object' &&
        typeof value.snippetInvariantId === 'string' &&
        !('snippetId' in value));
}
function isInlineSnippetDescriptor(value) {
    return (value &&
        typeof value === 'object' &&
        typeof value.inlineSnippet === 'object' &&
        Array.isArray(value.parameterOverrides));
}
function isReusableSnippetDescriptor(value) {
    return (value &&
        typeof value === 'object' &&
        typeof value.snippetInvariantId === 'string' &&
        typeof value.snippetId === 'string' &&
        Array.isArray(value.parameterOverrides));
}
