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

import typing
import pathlib
from styxdefs import *
import dataclasses

FEAT_MODEL_METADATA = Metadata(
    id="fc17fd0e3d064d3ee3d8b2f284af9132f7aaef7e.boutiques",
    name="feat_model",
    package="fsl",
    container_image_tag="mcin/fsl:6.0.5",
)


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


def feat_model(
    design_name_root: str,
    confound_matrix: InputPathType | None = None,
    runner: Runner | None = None,
) -> FeatModelOutputs:
    """
    Generate design matrices for use by FEAT.
    
    Author: Oxford Centre for Functional MRI of the Brain (FMRIB)
    
    URL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FEAT
    
    Args:
        design_name_root: Design name root.
        confound_matrix: Confound matrix text file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FeatModelOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(FEAT_MODEL_METADATA)
    cargs = []
    cargs.append("feat_model")
    cargs.append(design_name_root)
    if confound_matrix is not None:
        cargs.append(execution.input_file(confound_matrix))
    ret = FeatModelOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "FEAT_MODEL_METADATA",
    "FeatModelOutputs",
    "feat_model",
]
