<!-- of-match-lineup -->
<div ng-if="pitch.homeTeam.formationRows < 2 && pitch.guestTeam.formationRows < 2 && match.homeTeam.formation.length < 1" of-coming-soon></div>

<section class="pitch-lineup" ng-if="pitch.homeTeam.formationRows > 1 && pitch.guestTeam.formationRows > 1">
    <div class="pitch-team-info">
        <span class="pitch-team-name">{{pitch.homeTeam.name}}</span>
        <span class="pitch-team-formation">{{pitch.homeTeam.formationLayout}}</span>
    </div>
    <div class="pitch-field">
        <div class="pitch-home-team pitch-home-team-{{::pitch.homeTeam.formationRows}}">
            <div ng-repeat="players in ::pitch.homeTeam.lineUp" class="pitch-formation-row pitch-formation-row-type-{{::pitch.homeTeam.formationRows}}">
                <div ng-repeat="player in ::players" class="pitch-player-type-{{::players.length}}">
                    <div class="pitch-player pitch-player-home">
                        <span class="pitch-home-shirt">{{::player.number}}&nbsp;</span>
                        <span class="pitch-player-name" ng-bind-html="playerName(player)">
                        </span>
                    </div>
                </div>
            </div>
        </div>

        <div class="pitch-guest-team pitch-guest-team-{{::pitch.guestTeam.formationRows}}">
            <div ng-repeat="players in ::pitch.guestTeam.lineUp" class="pitch-formation-row pitch-formation-row-type-{{::pitch.guestTeam.formationRows}}">
                <div ng-repeat="player in ::players" class="pitch-player-type-{{::players.length}}">
                    <div class="pitch-player pitch-player-guest">
                        <span class="pitch-guest-shirt">{{::player.number}}&nbsp;</span>
                        <span class="pitch-player-name" ng-bind-html="playerName(player)">
                        </span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="pitch-team-info">
        <span class="pitch-team-name">{{::pitch.guestTeam.name}}</span>
        <span class="pitch-team-formation">{{::pitch.guestTeam.formationLayout}}</span>
    </div>
</section>

<div class="card game-lineup game-lineup-home" ng-if="match.homeTeam.formation.length > 0">
    <header class="card-header">
        <h1 class="card-title">{{::match.homeTeam.name}}</h1>
    </header>
    <div class="card-body card-body-padding" ng-if="match.homeTeam.substitutions.length > 0">
        <h4>{{'SUBSTITUTIONS'|translate}}</h4>
        <p ng-repeat="substitution in match.homeTeam.substitutions" class="substitution">{{::substitution.minute}}' {{::substitution.playerIn.name}} => {{::substitution.playerOut.name}}
        </p>
    </div>
</div>

<div class="card game-lineup game-lineup-guest" ng-if="match.guestTeam.formation.length > 0">
    <div class="card-header">
        <h1 class="card-title">{{match.guestTeam.name}}</h1>
    </div>
    <div class="card-body card-body-padding" ng-if="match.guestTeam.substitutions.length > 0">
        <h4>{{'SUBSTITUTIONS'|translate}}</h4>
        <p ng-repeat="substitution in ::match.guestTeam.substitutions" class="substitution">{{::substitution.minute}}' {{::substitution.playerIn.name}} => {{::substitution.playerOut.name}}
        </p>
    </div>
</div>
