src/Models/Branch.ps1

# Branch — Una branch git con su estado vs remoto.
# Mapea 1:1 con window.RN.BRANCHES.

class Branch {
    [string] $Name
    [bool]   $IsCurrent
    [string] $Remote          # 'origin' o $null si local-only
    [int]    $Ahead
    [int]    $Behind
    [string] $LastCommitDate  # human-readable ("2h", "1d")
    [string] $LastCommitAuthor
    [bool]   $IsProtected     # main, master, develop, release/*

    Branch() { }
    Branch([string]$name, [bool]$isCurrent) {
        $this.Name = $name
        $this.IsCurrent = $isCurrent
    }

    [bool] IsLocalOnly() { return -not $this.Remote }

    [string] ToString() {
        $star = if ($this.IsCurrent) { '* ' } else { ' ' }
        return "$star$($this.Name)"
    }
}