from pathlib import Path
from typing import List, Optional

from typer import Argument

from deckz.cli import app
from deckz.paths import Paths
from deckz.running import run as running_run


@app.command()
def run(
    targets: Optional[List[str]] = Argument(None),
    handout: bool = True,
    presentation: bool = True,
    print: bool = True,
    deck_path: Path = Path("."),
) -> None:
    """Compile main targets."""
    paths = Paths.from_defaults(deck_path)
    running_run(
        paths=paths,
        build_handout=handout,
        build_presentation=presentation,
        build_print=print,
        target_whitelist=targets,
    )

[((192, 205), 'deckz.cli.app.command', 'app.command', ([], {}), '()\n', (203, 205), False, 'from deckz.cli import app\n'), ((250, 264), 'typer.Argument', 'Argument', (['None'], {}), '(None)\n', (258, 264), False, 'from typer import Argument\n'), ((369, 378), 'pathlib.Path', 'Path', (['"""."""'], {}), "('.')\n", (373, 378), False, 'from pathlib import Path\n'), ((435, 465), 'deckz.paths.Paths.from_defaults', 'Paths.from_defaults', (['deck_path'], {}), '(deck_path)\n', (454, 465), False, 'from deckz.paths import Paths\n'), ((470, 600), 'deckz.running.run', 'running_run', ([], {'paths': 'paths', 'build_handout': 'handout', 'build_presentation': 'presentation', 'build_print': 'print', 'target_whitelist': 'targets'}), '(paths=paths, build_handout=handout, build_presentation=\n    presentation, build_print=print, target_whitelist=targets)\n', (481, 600), True, 'from deckz.running import run as running_run\n')]