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

import typing
import pathlib
from styxdefs import *
import dataclasses

SURF_MESH_METADATA = Metadata(
    id="17456ade2fbfcd3f3f36958eec099db8f2e90864.boutiques",
    name="SurfMesh",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class SurfMeshOutputs(typing.NamedTuple):
    """
    Output object returned when calling `surf_mesh(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_surface_file: OutputPathType
    """Output surface file"""


def surf_mesh(
    runner: Runner | None = None,
) -> SurfMeshOutputs:
    """
    Surface mesh manipulation tool.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/SurfMesh.html
    
    Args:
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `SurfMeshOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(SURF_MESH_METADATA)
    cargs = []
    cargs.append("SurfMesh")
    cargs.append("<-i_TYPE")
    cargs.append("SURFACE>")
    cargs.append("<-o_TYPE")
    cargs.append("OUTPUT>")
    cargs.append("<-edges")
    cargs.append("FRAC>")
    cargs.append("[-sv")
    cargs.append("SURF_VOL]")
    ret = SurfMeshOutputs(
        root=execution.output_file("."),
        output_surface_file=execution.output_file("[OUTPUT].surface"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "SURF_MESH_METADATA",
    "SurfMeshOutputs",
    "surf_mesh",
]
