// Code generated by `mise run codegen:captures`. DO NOT EDIT.

///|
/// Register a typed parameter type whose transformer takes 1 capture
/// group value. See `define_with` for the rules.
pub fn[T] ParamTypeRegistry::define1(
  self : ParamTypeRegistry,
  name : String,
  regexps : Array[RegexPattern],
  transformer : (String) -> T raise,
  use_for_snippets? : Bool = true,
  prefer_for_regexp_match? : Bool = false,
) -> ParameterType[T] raise ParameterTypeError {
  self.define_with(
    name,
    regexps,
    Captures::string().map(transformer),
    use_for_snippets~,
    prefer_for_regexp_match~,
  )
}

///|
/// Register a typed parameter type whose transformer takes 2 capture
/// group values. See `define_with` for the rules.
pub fn[T] ParamTypeRegistry::define2(
  self : ParamTypeRegistry,
  name : String,
  regexps : Array[RegexPattern],
  transformer : (String, String) -> T raise,
  use_for_snippets? : Bool = true,
  prefer_for_regexp_match? : Bool = false,
) -> ParameterType[T] raise ParameterTypeError {
  self.define_with(
    name,
    regexps,
    Captures::string().zip(Captures::string()).map(transformer),
    use_for_snippets~,
    prefer_for_regexp_match~,
  )
}

///|
/// Register a typed parameter type whose transformer takes 3 capture
/// group values. See `define_with` for the rules.
pub fn[T] ParamTypeRegistry::define3(
  self : ParamTypeRegistry,
  name : String,
  regexps : Array[RegexPattern],
  transformer : (String, String, String) -> T raise,
  use_for_snippets? : Bool = true,
  prefer_for_regexp_match? : Bool = false,
) -> ParameterType[T] raise ParameterTypeError {
  self.define_with(
    name,
    regexps,
    Captures::string()
    .zip(Captures::string())
    .zip(Captures::string())
    .map(transformer),
    use_for_snippets~,
    prefer_for_regexp_match~,
  )
}

///|
/// Register a typed parameter type whose transformer takes 4 capture
/// group values. See `define_with` for the rules.
pub fn[T] ParamTypeRegistry::define4(
  self : ParamTypeRegistry,
  name : String,
  regexps : Array[RegexPattern],
  transformer : (String, String, String, String) -> T raise,
  use_for_snippets? : Bool = true,
  prefer_for_regexp_match? : Bool = false,
) -> ParameterType[T] raise ParameterTypeError {
  self.define_with(
    name,
    regexps,
    Captures::string()
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .map(transformer),
    use_for_snippets~,
    prefer_for_regexp_match~,
  )
}

///|
/// Register a typed parameter type whose transformer takes 5 capture
/// group values. See `define_with` for the rules.
pub fn[T] ParamTypeRegistry::define5(
  self : ParamTypeRegistry,
  name : String,
  regexps : Array[RegexPattern],
  transformer : (String, String, String, String, String) -> T raise,
  use_for_snippets? : Bool = true,
  prefer_for_regexp_match? : Bool = false,
) -> ParameterType[T] raise ParameterTypeError {
  self.define_with(
    name,
    regexps,
    Captures::string()
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .map(transformer),
    use_for_snippets~,
    prefer_for_regexp_match~,
  )
}

///|
/// Register a typed parameter type whose transformer takes 6 capture
/// group values. See `define_with` for the rules.
pub fn[T] ParamTypeRegistry::define6(
  self : ParamTypeRegistry,
  name : String,
  regexps : Array[RegexPattern],
  transformer : (String, String, String, String, String, String) -> T raise,
  use_for_snippets? : Bool = true,
  prefer_for_regexp_match? : Bool = false,
) -> ParameterType[T] raise ParameterTypeError {
  self.define_with(
    name,
    regexps,
    Captures::string()
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .map(transformer),
    use_for_snippets~,
    prefer_for_regexp_match~,
  )
}

///|
/// Register a typed parameter type whose transformer takes 7 capture
/// group values. See `define_with` for the rules.
pub fn[T] ParamTypeRegistry::define7(
  self : ParamTypeRegistry,
  name : String,
  regexps : Array[RegexPattern],
  transformer : (String, String, String, String, String, String, String) -> T raise,
  use_for_snippets? : Bool = true,
  prefer_for_regexp_match? : Bool = false,
) -> ParameterType[T] raise ParameterTypeError {
  self.define_with(
    name,
    regexps,
    Captures::string()
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .map(transformer),
    use_for_snippets~,
    prefer_for_regexp_match~,
  )
}

///|
/// Register a typed parameter type whose transformer takes 8 capture
/// group values. See `define_with` for the rules.
pub fn[T] ParamTypeRegistry::define8(
  self : ParamTypeRegistry,
  name : String,
  regexps : Array[RegexPattern],
  transformer : (String, String, String, String, String, String, String, String) -> T raise,
  use_for_snippets? : Bool = true,
  prefer_for_regexp_match? : Bool = false,
) -> ParameterType[T] raise ParameterTypeError {
  self.define_with(
    name,
    regexps,
    Captures::string()
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .zip(Captures::string())
    .map(transformer),
    use_for_snippets~,
    prefer_for_regexp_match~,
  )
}