@echo off
chcp 65001 >nul
setlocal
title Autocall Client Installer

REM Default mode = update (always pull latest client; Node/ADB/Samsung installed once)
set MODE=%1
if "%MODE%"=="" set MODE=update

set PSARGS=
if /I "%MODE%"=="update" set PSARGS=-ForceClient
if /I "%MODE%"=="force"  set PSARGS=-Force
if /I "%MODE%"=="skip"   set PSARGS=

echo.
echo ================================================
echo   Autocall Client Auto Installer
echo ================================================
echo.
echo   Mode: %MODE%  (default = update: always pull latest client)
echo.
echo   Usage:
echo     install.cmd          - default (always update client to latest)
echo     install.cmd skip     - skip if already installed
echo     install.cmd force    - reinstall everything (Node/ADB too)
echo.
pause

powershell -NoProfile -ExecutionPolicy Bypass -Command "$ProgressPreference='SilentlyContinue'; iwr ('https://auto.tla.so/installer/install.ps1?t=' + (Get-Date -Format yyyyMMddHHmmss)) -OutFile $env:TEMP\autocall-install.ps1; & $env:TEMP\autocall-install.ps1 %PSARGS%"

echo.
echo  Installer finished. You can close this window.
pause
