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

import typing
import pathlib
from styxdefs import *
import dataclasses

FEAT_METADATA = Metadata(
    id="dbbaab6a8f5e02741899d759348059945801df59.boutiques",
    name="feat",
    package="fsl",
    container_image_tag="brainlife/fsl:6.0.4-patched2",
)


class FeatOutputs(typing.NamedTuple):
    """
    Output object returned when calling `feat(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_dir: OutputPathType
    """Output directory containing all results from FEAT"""


def feat(
    design_file: InputPathType,
    runner: Runner | None = None,
) -> FeatOutputs:
    """
    fMRI Expert Analysis Tool.
    
    Author: FMRIB Analysis Group, University of Oxford
    
    URL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki
    
    Args:
        design_file: FEAT design file (e.g. design.fsf).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FeatOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(FEAT_METADATA)
    cargs = []
    cargs.append("feat")
    cargs.append(execution.input_file(design_file))
    ret = FeatOutputs(
        root=execution.output_file("."),
        output_dir=execution.output_file("design.feat"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "FEAT_METADATA",
    "FeatOutputs",
    "feat",
]
