# This file was auto generated by Styx.
# Do not edit this file directly.

import typing
import pathlib
from styxdefs import *
import dataclasses

RCA_CONFIG_METADATA = Metadata(
    id="51c0aae9a34d0b770555399cc01f066ce00769c7.boutiques",
    name="rca-config",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class RcaConfigOutputs(typing.NamedTuple):
    """
    Output object returned when calling `rca_config(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def rca_config(
    source_config: InputPathType,
    updated_config: InputPathType,
    unknown_args_file: InputPathType,
    args: list[str] | None = None,
    runner: Runner | None = None,
) -> RcaConfigOutputs:
    """
    A command-line tool that processes configuration files and arguments.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        source_config: Path to the source configuration file.
        updated_config: Path to the updated configuration file.
        unknown_args_file: Path to the file where unknown arguments are\
            recorded.
        args: Additional arguments to be processed.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `RcaConfigOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(RCA_CONFIG_METADATA)
    cargs = []
    cargs.extend([
        "-config",
        "recon" + execution.input_file(source_config)
    ])
    cargs.append(execution.input_file(updated_config))
    cargs.append(execution.input_file(unknown_args_file))
    if args is not None:
        cargs.extend(args)
    ret = RcaConfigOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "RCA_CONFIG_METADATA",
    "RcaConfigOutputs",
    "rca_config",
]
