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,
    )

[(11, 'deckz.cli.app.command', 'app.command', False, 'from deckz.cli import app\n'), (13, 'typer.Argument', 'Argument', False, 'from typer import Argument\n'), (17, 'pathlib.Path', 'Path', False, 'from pathlib import Path\n'), (20, 'deckz.paths.Paths.from_defaults', 'Paths.from_defaults', False, 'from deckz.paths import Paths\n'), (21, 'deckz.running.run', 'running_run', True, 'from deckz.running import run as running_run\n')]