param(
    [string]$ConfigPath = "D:\projects\skills\vip-report\config.yaml",
    [string]$ReportMonth = "",
    [int]$ReportYear = 0,
    [int]$CompareYear = 0,
    [string]$OutputOps = ""
)

$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $PSScriptRoot

$pythonArgs = @(
    "$root\scripts\build_slide12_editable_ops.py",
    "--config", "$ConfigPath"
)
if ($ReportMonth) {
    $pythonArgs += @("--report-month", "$ReportMonth")
}
if ($ReportYear -gt 0) {
    $pythonArgs += @("--report-year", "$ReportYear")
}
if ($CompareYear -gt 0) {
    $pythonArgs += @("--compare-year", "$CompareYear")
}
if ($OutputOps) {
    $pythonArgs += @("--output-ops", "$OutputOps")
}

python @pythonArgs
