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

import typing
import pathlib
from styxdefs import *
import dataclasses

BAYES_VIEW_METADATA = Metadata(
    id="6b7c34a2ea4931bfe8ed6b989b43904d7d18f61b.boutiques",
    name="bayes_view",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


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


def bayes_view(
    input_folder: str,
    help_: bool = False,
    shiny_folder: str | None = None,
    runner: Runner | None = None,
) -> BayesViewOutputs:
    """
    Launch a shiny app to visualize RBA output files. The files must have the .RData
    extension.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        input_folder: Path to a folder containing .RData files.
        help_: Show help message.
        shiny_folder: Use a custom shiny folder (for testing purposes).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `BayesViewOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(BAYES_VIEW_METADATA)
    cargs = []
    cargs.append("bayes_view")
    cargs.append(input_folder)
    if help_:
        cargs.append("-help")
    if shiny_folder is not None:
        cargs.extend([
            "-ShinyFolder",
            shiny_folder
        ])
    ret = BayesViewOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "BAYES_VIEW_METADATA",
    "BayesViewOutputs",
    "bayes_view",
]
