import { WireType } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
class Params$Type extends MessageType {
  constructor() {
    super("injective.txfees.v1beta1.Params", [
      { no: 1, name: "max_gas_wanted_per_tx", kind: "scalar", T: 4, L: 0, options: { "gogoproto.moretags": 'yaml:"max_gas_wanted_per_tx"' } },
      { no: 2, name: "high_gas_tx_threshold", kind: "scalar", T: 4, L: 0, options: { "gogoproto.moretags": 'yaml:"high_gas_tx_threshold"' } },
      { no: 3, name: "min_gas_price_for_high_gas_tx", kind: "scalar", T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec", "gogoproto.moretags": 'yaml:"min_gas_price_for_high_gas_tx"', "cosmos_proto.scalar": "cosmos.Dec" } },
      { no: 4, name: "mempool1559_enabled", kind: "scalar", T: 8, options: { "gogoproto.moretags": 'yaml:"mempool1559_enabled"' } },
      { no: 5, name: "min_gas_price", kind: "scalar", T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec", "gogoproto.moretags": 'yaml:"min_gas_price"', "cosmos_proto.scalar": "cosmos.Dec" } },
      { no: 6, name: "default_base_fee_multiplier", kind: "scalar", T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec", "gogoproto.moretags": 'yaml:"default_base_fee_multiplier"', "cosmos_proto.scalar": "cosmos.Dec" } },
      { no: 7, name: "max_base_fee_multiplier", kind: "scalar", T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec", "gogoproto.moretags": 'yaml:"max_base_fee_multiplier"', "cosmos_proto.scalar": "cosmos.Dec" } },
      { no: 8, name: "reset_interval", kind: "scalar", T: 3, L: 0, options: { "gogoproto.moretags": 'yaml:"reset_interval"' } },
      { no: 9, name: "max_block_change_rate", kind: "scalar", T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec", "gogoproto.moretags": 'yaml:"max_block_change_rate"', "cosmos_proto.scalar": "cosmos.Dec" } },
      { no: 10, name: "target_block_space_percent_rate", kind: "scalar", T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec", "gogoproto.moretags": 'yaml:"target_block_space_percent_rate"', "cosmos_proto.scalar": "cosmos.Dec" } },
      { no: 11, name: "recheck_fee_low_base_fee", kind: "scalar", T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec", "gogoproto.moretags": 'yaml:"recheck_fee_low_base_fee"', "cosmos_proto.scalar": "cosmos.Dec" } },
      { no: 12, name: "recheck_fee_high_base_fee", kind: "scalar", T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec", "gogoproto.moretags": 'yaml:"recheck_fee_high_base_fee"', "cosmos_proto.scalar": "cosmos.Dec" } },
      { no: 13, name: "recheck_fee_base_fee_threshold_multiplier", kind: "scalar", T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec", "gogoproto.moretags": 'yaml:"recheck_fee_base_fee_threshold_multiplier"', "cosmos_proto.scalar": "cosmos.Dec" } }
    ], { "gogoproto.equal": true, "amino.name": "txfees/Params" });
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.maxGasWantedPerTx = 0n;
    message.highGasTxThreshold = 0n;
    message.minGasPriceForHighGasTx = "";
    message.mempool1559Enabled = false;
    message.minGasPrice = "";
    message.defaultBaseFeeMultiplier = "";
    message.maxBaseFeeMultiplier = "";
    message.resetInterval = 0n;
    message.maxBlockChangeRate = "";
    message.targetBlockSpacePercentRate = "";
    message.recheckFeeLowBaseFee = "";
    message.recheckFeeHighBaseFee = "";
    message.recheckFeeBaseFeeThresholdMultiplier = "";
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* uint64 max_gas_wanted_per_tx */
        1:
          message.maxGasWantedPerTx = reader.uint64().toBigInt();
          break;
        case /* uint64 high_gas_tx_threshold */
        2:
          message.highGasTxThreshold = reader.uint64().toBigInt();
          break;
        case /* string min_gas_price_for_high_gas_tx */
        3:
          message.minGasPriceForHighGasTx = reader.string();
          break;
        case /* bool mempool1559_enabled */
        4:
          message.mempool1559Enabled = reader.bool();
          break;
        case /* string min_gas_price */
        5:
          message.minGasPrice = reader.string();
          break;
        case /* string default_base_fee_multiplier */
        6:
          message.defaultBaseFeeMultiplier = reader.string();
          break;
        case /* string max_base_fee_multiplier */
        7:
          message.maxBaseFeeMultiplier = reader.string();
          break;
        case /* int64 reset_interval */
        8:
          message.resetInterval = reader.int64().toBigInt();
          break;
        case /* string max_block_change_rate */
        9:
          message.maxBlockChangeRate = reader.string();
          break;
        case /* string target_block_space_percent_rate */
        10:
          message.targetBlockSpacePercentRate = reader.string();
          break;
        case /* string recheck_fee_low_base_fee */
        11:
          message.recheckFeeLowBaseFee = reader.string();
          break;
        case /* string recheck_fee_high_base_fee */
        12:
          message.recheckFeeHighBaseFee = reader.string();
          break;
        case /* string recheck_fee_base_fee_threshold_multiplier */
        13:
          message.recheckFeeBaseFeeThresholdMultiplier = reader.string();
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.maxGasWantedPerTx !== 0n)
      writer.tag(1, WireType.Varint).uint64(message.maxGasWantedPerTx);
    if (message.highGasTxThreshold !== 0n)
      writer.tag(2, WireType.Varint).uint64(message.highGasTxThreshold);
    if (message.minGasPriceForHighGasTx !== "")
      writer.tag(3, WireType.LengthDelimited).string(message.minGasPriceForHighGasTx);
    if (message.mempool1559Enabled !== false)
      writer.tag(4, WireType.Varint).bool(message.mempool1559Enabled);
    if (message.minGasPrice !== "")
      writer.tag(5, WireType.LengthDelimited).string(message.minGasPrice);
    if (message.defaultBaseFeeMultiplier !== "")
      writer.tag(6, WireType.LengthDelimited).string(message.defaultBaseFeeMultiplier);
    if (message.maxBaseFeeMultiplier !== "")
      writer.tag(7, WireType.LengthDelimited).string(message.maxBaseFeeMultiplier);
    if (message.resetInterval !== 0n)
      writer.tag(8, WireType.Varint).int64(message.resetInterval);
    if (message.maxBlockChangeRate !== "")
      writer.tag(9, WireType.LengthDelimited).string(message.maxBlockChangeRate);
    if (message.targetBlockSpacePercentRate !== "")
      writer.tag(10, WireType.LengthDelimited).string(message.targetBlockSpacePercentRate);
    if (message.recheckFeeLowBaseFee !== "")
      writer.tag(11, WireType.LengthDelimited).string(message.recheckFeeLowBaseFee);
    if (message.recheckFeeHighBaseFee !== "")
      writer.tag(12, WireType.LengthDelimited).string(message.recheckFeeHighBaseFee);
    if (message.recheckFeeBaseFeeThresholdMultiplier !== "")
      writer.tag(13, WireType.LengthDelimited).string(message.recheckFeeBaseFeeThresholdMultiplier);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const Params = new Params$Type();
export {
  Params
};
