"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__tsfTypeAliases = exports.classOptions = exports.classMetadata = void 0;
exports.applyMetadataOptions = applyMetadataOptions;
const tslib_1 = require("tslib");
const _a = tslib_1.__importStar(require("@zyno-io/ts-server-foundation/type-metadata-runtime"));
exports.classMetadata = new WeakMap();
exports.classOptions = new WeakMap();
function applyMetadataOptions(metadata, options) {
    if (!options)
        return;
    if (options.collectionName)
        metadata.collectionName = options.collectionName;
    if (options.indexes?.length)
        metadata.indexes = [...options.indexes];
    if (options.excludeMigration)
        metadata.excludeMigration = true;
}
exports.__tsfTypeAliases = _a.decodeCompactMetadataV1("[1,{\"EntityClassDecorator\":{\"kind\":13,\"types\":[{\"kind\":16,\"typeName\":\"ClassDecorator\",\"classType\":{\"$tsf\":0}},{\"kind\":18,\"types\":[]}],\"typeName\":\"EntityClassDecorator\"},\"EntityOptions\":{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"collectionName\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"indexes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"names\",\"type\":{\"kind\":14,\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":7},{\"kind\":2,\"typeName\":\"symbol\"}]}},\"optional\":false},{\"kind\":20,\"name\":\"options\",\"type\":{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"kind\":1}],\"index\":{\"kind\":1},\"types\":[]},\"optional\":false}],\"typeName\":\"EntityIndexMetadata\",\"typeName\":\"EntityIndexMetadata\"}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"excludeMigration\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"generatedColumns\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"GeneratedColumnOptions\",\"types\":[{\"kind\":20,\"name\":\"expression\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"storage\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"virtual\"},{\"kind\":10,\"literal\":\"stored\"}],\"typeName\":\"GeneratedColumnStorage\"},\"optional\":false}]}],\"index\":{\"kind\":18,\"typeName\":\"GeneratedColumnOptions\",\"types\":[{\"kind\":20,\"name\":\"expression\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"storage\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"virtual\"},{\"kind\":10,\"literal\":\"stored\"}],\"typeName\":\"GeneratedColumnStorage\"},\"optional\":false}]},\"types\":[]},{\"kind\":4}]},\"optional\":true}],\"typeName\":\"EntityOptions\"},\"GeneratedColumnOptions\":{\"kind\":18,\"typeName\":\"GeneratedColumnOptions\",\"types\":[{\"kind\":20,\"name\":\"expression\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"storage\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"virtual\"},{\"kind\":10,\"literal\":\"stored\"}],\"typeName\":\"GeneratedColumnStorage\"},\"optional\":false}]},\"GeneratedColumnStorage\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"virtual\"},{\"kind\":10,\"literal\":\"stored\"}],\"typeName\":\"GeneratedColumnStorage\"}}]", [() => (typeof ClassDecorator !== "undefined" ? ClassDecorator : (typeof exports !== "undefined" ? exports.ClassDecorator : undefined))]);
//# sourceMappingURL=metadata-store.js.map