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

import typing
import pathlib
from styxdefs import *
import dataclasses

SURFMATHS_METADATA = Metadata(
    id="b8ae24d5ed4caf90d6715b600edc707e3ecce266.boutiques",
    name="surfmaths",
    package="fsl",
    container_image_tag="mcin/fsl:6.0.5",
)


class SurfmathsOutputs(typing.NamedTuple):
    """
    Output object returned when calling `surfmaths(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """Output surface file generated by the tool."""


def surfmaths(
    first_input: InputPathType,
    output: InputPathType,
    operations_inputs: list[str] | None = None,
    runner: Runner | None = None,
) -> SurfmathsOutputs:
    """
    A command-line tool for performing various mathematical operations on surface
    files.
    
    Args:
        first_input: First input surface file.
        output: Output surface file.
        operations_inputs: Mathematical operations and additional inputs.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `SurfmathsOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(SURFMATHS_METADATA)
    cargs = []
    cargs.append("surfmaths")
    cargs.append(execution.input_file(first_input))
    if operations_inputs is not None:
        cargs.extend(operations_inputs)
    cargs.append(execution.input_file(output))
    ret = SurfmathsOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(pathlib.Path(output).name),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "SURFMATHS_METADATA",
    "SurfmathsOutputs",
    "surfmaths",
]
