"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AutoBeTestPredicateProgrammer = void 0;
const typescript_1 = __importDefault(require("typescript"));
const ExpressionFactory_1 = require("typia/lib/factories/ExpressionFactory");
const writeTestExpression_1 = require("./writeTestExpression");
var AutoBeTestPredicateProgrammer;
(function (AutoBeTestPredicateProgrammer) {
    AutoBeTestPredicateProgrammer.equalPredicate = (ctx, expression) => ExpressionFactory_1.ExpressionFactory.currying({
        function: typescript_1.default.factory.createPropertyAccessExpression(typescript_1.default.factory.createIdentifier(ctx.importer.external({
            type: "instance",
            library: "@nestia/e2e",
            name: "TestValidator",
        })), "equals"),
        arguments: [
            typescript_1.default.factory.createStringLiteral(expression.title),
            (0, writeTestExpression_1.writeTestExpression)(ctx, expression.x),
            (0, writeTestExpression_1.writeTestExpression)(ctx, expression.y),
        ],
    });
    AutoBeTestPredicateProgrammer.notEqualPredicate = (ctx, expression) => ExpressionFactory_1.ExpressionFactory.currying({
        function: typescript_1.default.factory.createPropertyAccessExpression(typescript_1.default.factory.createIdentifier(ctx.importer.external({
            type: "instance",
            library: "@nestia/e2e",
            name: "TestValidator",
        })), "error"),
        arguments: [
            typescript_1.default.factory.createStringLiteral(expression.title),
            typescript_1.default.factory.createArrowFunction(undefined, undefined, [], undefined, undefined, AutoBeTestPredicateProgrammer.equalPredicate(ctx, {
                type: "equalPredicate",
                title: expression.title,
                x: expression.x,
                y: expression.y,
            })),
        ],
    });
    AutoBeTestPredicateProgrammer.conditionalPredicate = (ctx, expression) => ExpressionFactory_1.ExpressionFactory.currying({
        function: typescript_1.default.factory.createPropertyAccessExpression(typescript_1.default.factory.createIdentifier(ctx.importer.external({
            type: "instance",
            library: "@nestia/e2e",
            name: "TestValidator",
        })), "predicate"),
        arguments: [
            typescript_1.default.factory.createStringLiteral(expression.title),
            (0, writeTestExpression_1.writeTestExpression)(ctx, expression.expression),
        ],
    });
    AutoBeTestPredicateProgrammer.errorPredicate = (ctx, expression) => ExpressionFactory_1.ExpressionFactory.currying({
        function: typescript_1.default.factory.createPropertyAccessExpression(typescript_1.default.factory.createIdentifier(ctx.importer.external({
            type: "instance",
            library: "@nestia/e2e",
            name: "TestValidator",
        })), "error"),
        arguments: [
            typescript_1.default.factory.createStringLiteral(expression.title),
            (0, writeTestExpression_1.writeTestExpression)(ctx, expression.function),
        ],
    });
    // export const httpErrorPredicate = (
    //   ctx: IAutoBeTestProgrammerContext,
    //   expression: AutoBeTest.IHttpErrorPredicate,
    // ): ts.CallExpression =>
    //   ExpressionFactory.currying({
    //     function: ts.factory.createPropertyAccessExpression(
    //       ts.factory.createIdentifier(
    //         ctx.importer.external({
    //           type: "instance",
    //           library: "@nestia/e2e",
    //           name: "TestValidator",
    //         }),
    //       ),
    //       "httpError",
    //     ),
    //     arguments: [
    //       ts.factory.createStringLiteral(expression.title),
    //       ts.factory.createNumericLiteral(expression.status),
    //       writeTestExpression(ctx, expression.function),
    //     ],
    //   });
})(AutoBeTestPredicateProgrammer || (exports.AutoBeTestPredicateProgrammer = AutoBeTestPredicateProgrammer = {}));
//# sourceMappingURL=AutoBeTestPredicateProgrammer.js.map