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

import typing
import pathlib
from styxdefs import *
import dataclasses

V__FIND_AFNI_DSET_PATH_METADATA = Metadata(
    id="f180e5877075d554456c8f3bc0bb390ac06654a3.boutiques",
    name="@FindAfniDsetPath",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


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


def v__find_afni_dset_path(
    dsetname: str,
    append_file: bool = False,
    full_path: bool = False,
    help_: bool = False,
    runner: Runner | None = None,
) -> VFindAfniDsetPathOutputs:
    """
    Searches various AFNI directories for a specified dataset and returns its path.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        dsetname: Name of the dataset to search for.
        append_file: Show the file appended to (even with atlas name).
        full_path: Print full path instead of '.'.
        help_: Display help message.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VFindAfniDsetPathOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V__FIND_AFNI_DSET_PATH_METADATA)
    cargs = []
    cargs.append("@FindAfniDsetPath")
    cargs.append(dsetname)
    if append_file:
        cargs.append("-append_file")
    if full_path:
        cargs.append("-full_path")
    if help_:
        cargs.append("-help")
    ret = VFindAfniDsetPathOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VFindAfniDsetPathOutputs",
    "V__FIND_AFNI_DSET_PATH_METADATA",
    "v__find_afni_dset_path",
]
