"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.prismaEnumToOptions = exports.scalarToTS = void 0;
var PrismaScalarToTypeScript = {
    String: 'string',
    Boolean: 'boolean',
    Int: 'number',
    // [Working with BigInt](https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields#working-with-bigint)
    BigInt: 'bigint',
    Float: 'number',
    // [Working with Decimal](https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields#working-with-decimal)
    Decimal: 'number',
    DateTime: 'Date',
    // [working with JSON fields](https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields)
    Json: 'Prisma.JsonValue',
    // [Working with Bytes](https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields#working-with-bytes)
    Bytes: 'Buffer'
};
var knownPrismaScalarTypes = Object.keys(PrismaScalarToTypeScript);
var scalarToTS = function (scalar, useInputTypes) {
    if (useInputTypes === void 0) { useInputTypes = false; }
    if (!knownPrismaScalarTypes.includes(scalar)) {
        return 'string';
    }
    // [Working with JSON fields](https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields)
    // supports different types for input / output. `Prisma.InputJsonValue` extends `Prisma.JsonValue` with `undefined`
    if (useInputTypes && scalar === 'Json') {
        return 'Prisma.InputJsonValue';
    }
    return PrismaScalarToTypeScript[scalar];
};
exports.scalarToTS = scalarToTS;
function prismaEnumToOptions(enumObject) {
    return Object.entries(enumObject).map(function (_a) {
        var k = _a[0], v = _a[1];
        return ({
            value: k,
            text: v
        });
    });
}
exports.prismaEnumToOptions = prismaEnumToOptions;
//# sourceMappingURL=prisma-helpers.js.map