text: "use strict";
  var __extends = (this && this.__extends) || (function () {
      var extendStatics = function (d, b) {
          extendStatics = Object.setPrototypeOf ||
              ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
              function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
          return extendStatics(d, b);
      };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  Object.defineProperty(exports, "__esModule", { value: true });
  var generator_1 = require("../../../generator");
  // TODO: The base type here might be unnecassary complex
  var ModelUpdateOneInputTypeGenerator = /** @class */ (function (_super) {
      __extends(ModelUpdateOneInputTypeGenerator, _super);
      function ModelUpdateOneInputTypeGenerator() {
          return _super !== null && _super.apply(this, arguments) || this;
      }
      ModelUpdateOneInputTypeGenerator.prototype.getTypeName = function (input, args) {
          return input.name + "UpdateOneInput";
      };
      ModelUpdateOneInputTypeGenerator.prototype.wouldBeEmpty = function (model, args) {
          return false;
      };
      ModelUpdateOneInputTypeGenerator.prototype.generateFields = function (model, args) {
          var fields = {};
          if (this.hasWriteableFields(model.fields)) {
              fields.create = {
                  type: this.generators.modelCreateInput.generate(model, {}),
              };
              fields.update = {
                  type: this.generators.modelUpdateDataInput.generate(model, {}),
              };
              fields.upsert = {
                  type: this.generators.modelUpsertNestedInput.generate(model, {}),
              };
          }
          fields.delete = {
              type: this.generators.scalarTypeGenerator.generate('Boolean', {}),
          };
          fields.disconnect = {
              type: this.generators.scalarTypeGenerator.generate('Boolean', {}),
          };
          if (!this.generators.modelWhereUniqueInput.wouldBeEmpty(model, args)) {
              fields.connect = {
                  type: this.generators.modelWhereUniqueInput.generate(model, {}),
              };
          }
          return fields;
      };
      return ModelUpdateOneInputTypeGenerator;
  }(generator_1.RelatedModelInputObjectTypeGenerator));
  exports.default = ModelUpdateOneInputTypeGenerator;
  //# sourceMappingURL=modelUpdateOneInputGenerator.js.map