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

import typing
import pathlib
from styxdefs import *
import dataclasses

FSL_MRS_PROC_METADATA = Metadata(
    id="e62daa9beaa26a320312c7a121d8f5ba8e43b85e.boutiques",
    name="fsl_mrs_proc",
    package="fsl",
    container_image_tag="mcin/fsl:6.0.5",
)


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


def fsl_mrs_proc(
    subcommand: typing.Literal["coilcombine", "average", "align", "align-diff", "ecc", "remove", "model", "tshift", "truncate", "apodize", "fshift", "unlike", "phase", "fixed_phase", "subtract", "add", "conj"],
    version_flag: bool = False,
    config_file: InputPathType | None = None,
    runner: Runner | None = None,
) -> FslMrsProcOutputs:
    """
    FSL Magnetic Resonance Spectroscopy - Preprocessing.
    
    Author: FMRIB Centre, University of Oxford
    
    URL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/
    
    Args:
        subcommand: The subcommand to run.
        version_flag: Show program's version number and exit.
        config_file: Configuration file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FslMrsProcOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(FSL_MRS_PROC_METADATA)
    cargs = []
    cargs.append("fsl_mrs_proc")
    if version_flag:
        cargs.append("-v")
    if config_file is not None:
        cargs.extend([
            "--config",
            execution.input_file(config_file)
        ])
    cargs.append(subcommand)
    ret = FslMrsProcOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "FSL_MRS_PROC_METADATA",
    "FslMrsProcOutputs",
    "fsl_mrs_proc",
]
