$pbVersion = "0.22.21"
$zipUrl = "https://github.com/pocketbase/pocketbase/releases/download/v${pbVersion}/pocketbase_${pbVersion}_windows_amd64.zip"
$outputZip = "pocketbase.zip"

Write-Host "Downloading PocketBase v${pbVersion}..."
Invoke-WebRequest -Uri $zipUrl -OutFile $outputZip

Write-Host "Extracting..."
Expand-Archive -Path $outputZip -DestinationPath . -Force

Write-Host "Cleaning up..."
Remove-Item $outputZip

Write-Host "PocketBase setup complete."
