"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AutoBeTestLiteralProgrammer = void 0;
const typescript_1 = __importDefault(require("typescript"));
const Escaper_1 = require("typia/lib/utils/Escaper");
const writeTestExpression_1 = require("./writeTestExpression");
var AutoBeTestLiteralProgrammer;
(function (AutoBeTestLiteralProgrammer) {
    AutoBeTestLiteralProgrammer.booleanLiteral = (_ctx, expr) => expr.value ? typescript_1.default.factory.createTrue() : typescript_1.default.factory.createFalse();
    AutoBeTestLiteralProgrammer.numericLiteral = (_ctx, expr) => expr.value < 0
        ? typescript_1.default.factory.createPrefixUnaryExpression(typescript_1.default.SyntaxKind.MinusToken, typescript_1.default.factory.createNumericLiteral(-expr.value))
        : typescript_1.default.factory.createNumericLiteral(expr.value);
    AutoBeTestLiteralProgrammer.stringLiteral = (_ctx, expr) => typescript_1.default.factory.createStringLiteral(expr.value);
    AutoBeTestLiteralProgrammer.arrayLiteralExpression = (ctx, expr) => typescript_1.default.factory.createArrayLiteralExpression(expr.elements.map((elem) => (0, writeTestExpression_1.writeTestExpression)(ctx, elem)), true);
    AutoBeTestLiteralProgrammer.objectLiteralExpression = (ctx, expr) => typescript_1.default.factory.createObjectLiteralExpression(expr.properties.map((e) => typescript_1.default.factory.createPropertyAssignment(Escaper_1.Escaper.variable(e.name)
        ? typescript_1.default.factory.createIdentifier(e.name)
        : typescript_1.default.factory.createStringLiteral(e.name), (0, writeTestExpression_1.writeTestExpression)(ctx, e.value))), true);
    AutoBeTestLiteralProgrammer.nullLiteral = (_ctx, _expr) => typescript_1.default.factory.createNull();
    AutoBeTestLiteralProgrammer.undefinedKeyword = (_ctx, _expr) => typescript_1.default.factory.createIdentifier("undefined");
})(AutoBeTestLiteralProgrammer || (exports.AutoBeTestLiteralProgrammer = AutoBeTestLiteralProgrammer = {}));
//# sourceMappingURL=AutoBeTestLiteralProgrammer.js.map