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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3D_MVM_VALIDATOR_METADATA = Metadata(
    id="363acd1c4d041e492d2ad96e8d901ff72270d361.boutiques",
    name="3dMVM_validator",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V3dMvmValidatorOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_3d_mvm_validator(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    temp_folder: OutputPathType
    """Temporary folder created during the shiny app session."""


def v_3d_mvm_validator(
    datatable: InputPathType,
    shinyfolder: str | None = None,
    runner: Runner | None = None,
) -> V3dMvmValidatorOutputs:
    """
    Launch the 3dMVM model validation shiny app in a web browser.
    
    Author: AFNI Team
    
    URL:
    https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dMVM_validator.html
    
    Args:
        datatable: A file containing a data table formatted like the 3dMVM\
            "-dataTable".
        shinyfolder: Use a custom shiny folder (for testing purposes).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dMvmValidatorOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3D_MVM_VALIDATOR_METADATA)
    cargs = []
    cargs.append("3dMVM_validator")
    cargs.append(execution.input_file(datatable))
    if shinyfolder is not None:
        cargs.extend([
            "-ShinyFolder",
            shinyfolder
        ])
    ret = V3dMvmValidatorOutputs(
        root=execution.output_file("."),
        temp_folder=execution.output_file("__*_3dMVM_validator_temp_delete"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dMvmValidatorOutputs",
    "V_3D_MVM_VALIDATOR_METADATA",
    "v_3d_mvm_validator",
]
