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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_CVS_CHECK_METADATA = Metadata(
    id="19f10a0aa62b259f8e415446e94d3a10512ce5d1.boutiques",
    name="mri_cvs_check",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def mri_cvs_check(
    mov_subjid: str,
    template_subjid: str | None = None,
    hemi: typing.Literal["lh", "rh"] | None = None,
    help_: bool = False,
    version: bool = False,
    runner: Runner | None = None,
) -> MriCvsCheckOutputs:
    """
    Checks whether the files required for mri_cvs_register all exist.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        mov_subjid: Subject id for the subject to be moved/registered (Should\
            be present in SUBJECTS_DIR).
        template_subjid: Subject id for the template subject to be kept fixed.\
            If missing, CVS template is assumed as a target.
        hemi: The hemisphere that is going to be processed. It can be 'lh' or\
            'rh'.
        help_: Print help and exit.
        version: Print version and exit.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriCvsCheckOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_CVS_CHECK_METADATA)
    cargs = []
    cargs.append("mri_cvs_check")
    cargs.extend([
        "--mov",
        mov_subjid
    ])
    if template_subjid is not None:
        cargs.extend([
            "--template",
            template_subjid
        ])
    if hemi is not None:
        cargs.extend([
            "--hemi",
            hemi
        ])
    if help_:
        cargs.append("--help")
    if version:
        cargs.append("--version")
    ret = MriCvsCheckOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_CVS_CHECK_METADATA",
    "MriCvsCheckOutputs",
    "mri_cvs_check",
]
