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

import typing
import pathlib
from styxdefs import *
import dataclasses

V__CHECK_FOR_AFNI_DSET_METADATA = Metadata(
    id="36d93d7fee0a8f5033359b79ea1fc2a9f56b9766.boutiques",
    name="@CheckForAfniDset",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class VCheckForAfniDsetOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v__check_for_afni_dset(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_status: OutputPathType
    """Text file containing the status code of the dataset"""


def v__check_for_afni_dset(
    dataset_name: str,
    runner: Runner | None = None,
) -> VCheckForAfniDsetOutputs:
    """
    Check for the existence of AFNI datasets.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        dataset_name: Path to the AFNI dataset (e.g.,\
            /Data/stuff/Hello+orig.HEAD).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VCheckForAfniDsetOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V__CHECK_FOR_AFNI_DSET_METADATA)
    cargs = []
    cargs.append("@CheckForAfniDset")
    cargs.append(dataset_name)
    ret = VCheckForAfniDsetOutputs(
        root=execution.output_file("."),
        output_status=execution.output_file(dataset_name + "_status.txt"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VCheckForAfniDsetOutputs",
    "V__CHECK_FOR_AFNI_DSET_METADATA",
    "v__check_for_afni_dset",
]
