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

import typing
import pathlib
from styxdefs import *
import dataclasses

AFNI_OPEN_METADATA = Metadata(
    id="bc26cd888725fb54434b468b3ff940475336e2f9.boutiques",
    name="afni_open",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


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


def afni_open(
    files: list[InputPathType],
    runner: Runner | None = None,
) -> AfniOpenOutputs:
    """
    A program to open various AFNI/SUMA files.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/afni_open.html
    
    Args:
        files: Input file(s) to be opened.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `AfniOpenOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(AFNI_OPEN_METADATA)
    cargs = []
    cargs.append("afni_open")
    cargs.append("[OPTIONS]")
    cargs.extend([execution.input_file(f) for f in files])
    cargs.append("[FILE2")
    cargs.append("...]")
    ret = AfniOpenOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "AFNI_OPEN_METADATA",
    "AfniOpenOutputs",
    "afni_open",
]
