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

import typing
import pathlib
from styxdefs import *
import dataclasses

GIFTI_LABEL_ADD_PREFIX_METADATA = Metadata(
    id="3d379a6c755dab747292a0a91f754e423ff73eca.boutiques",
    name="gifti-label-add-prefix",
    package="workbench",
    container_image_tag="brainlife/connectome_workbench:1.5.0-freesurfer-update",
)


class GiftiLabelAddPrefixOutputs(typing.NamedTuple):
    """
    Output object returned when calling `gifti_label_add_prefix(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    label_out: OutputPathType
    """the output label file"""


def gifti_label_add_prefix(
    label_in: InputPathType,
    prefix: str,
    label_out: str,
    runner: Runner | None = None,
) -> GiftiLabelAddPrefixOutputs:
    """
    Add prefix to all label names in a gifti label file.
    
    For each label other than '???', prepend <prefix> to the label name.
    
    Author: Connectome Workbench Developers
    
    URL: https://github.com/Washington-University/workbench
    
    Args:
        label_in: the input label file.
        prefix: the prefix string to add.
        label_out: the output label file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `GiftiLabelAddPrefixOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(GIFTI_LABEL_ADD_PREFIX_METADATA)
    cargs = []
    cargs.append("wb_command")
    cargs.append("-gifti-label-add-prefix")
    cargs.append(execution.input_file(label_in))
    cargs.append(prefix)
    cargs.append(label_out)
    ret = GiftiLabelAddPrefixOutputs(
        root=execution.output_file("."),
        label_out=execution.output_file(label_out),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "GIFTI_LABEL_ADD_PREFIX_METADATA",
    "GiftiLabelAddPrefixOutputs",
    "gifti_label_add_prefix",
]
