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

import typing
import pathlib
from styxdefs import *

SURFACE_INFORMATION_METADATA = Metadata(
    id="237f94d9fda300e4c808bf66e35bc7a6bf87f07a.boutiques",
    name="surface-information",
    package="workbench",
    container_image_tag="brainlife/connectome_workbench:1.5.0-freesurfer-update",
)


SurfaceInformationParameters = typing.TypedDict('SurfaceInformationParameters', {
    "@type": typing.NotRequired[typing.Literal["workbench/surface-information"]],
    "surface_file": InputPathType,
})
SurfaceInformationParametersTagged = typing.TypedDict('SurfaceInformationParametersTagged', {
    "@type": typing.Literal["workbench/surface-information"],
    "surface_file": InputPathType,
})


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


def surface_information_params(
    surface_file: InputPathType,
) -> SurfaceInformationParametersTagged:
    """
    Build parameters.
    
    Args:
        surface_file: Surface for which information is displayed.
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "workbench/surface-information",
        "surface_file": surface_file,
    }
    return params


def surface_information_cargs(
    params: SurfaceInformationParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("wb_command")
    cargs.append("-surface-information")
    cargs.append(execution.input_file(params.get("surface_file", None)))
    return cargs


def surface_information_outputs(
    params: SurfaceInformationParameters,
    execution: Execution,
) -> SurfaceInformationOutputs:
    """
    Build outputs object containing output file paths and possibly stdout/stderr.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Outputs object.
    """
    ret = SurfaceInformationOutputs(
        root=execution.output_file("."),
    )
    return ret


def surface_information_execute(
    params: SurfaceInformationParameters,
    runner: Runner | None = None,
) -> SurfaceInformationOutputs:
    """
    surface-information
    
    Display information about a surface.
    
    Information about surface is displayed including vertices,
    triangles, bounding box, and spacing.
    
    Author: Connectome Workbench Developers
    
    URL: https://github.com/Washington-University/workbench
    
    Args:
        params: The parameters.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `SurfaceInformationOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(SURFACE_INFORMATION_METADATA)
    params = execution.params(params)
    cargs = surface_information_cargs(params, execution)
    ret = surface_information_outputs(params, execution)
    execution.run(cargs)
    return ret


def surface_information(
    surface_file: InputPathType,
    runner: Runner | None = None,
) -> SurfaceInformationOutputs:
    """
    surface-information
    
    Display information about a surface.
    
    Information about surface is displayed including vertices,
    triangles, bounding box, and spacing.
    
    Author: Connectome Workbench Developers
    
    URL: https://github.com/Washington-University/workbench
    
    Args:
        surface_file: Surface for which information is displayed.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `SurfaceInformationOutputs`).
    """
    params = surface_information_params(
        surface_file=surface_file,
    )
    return surface_information_execute(params, runner)


__all__ = [
    "SURFACE_INFORMATION_METADATA",
    "SurfaceInformationOutputs",
    "surface_information",
    "surface_information_execute",
    "surface_information_params",
]
