<h2 translate>Voting result</h2>
<div class="meta-text">
    <span translate>Special values</span>:<br />
    <mat-chip>-1</mat-chip>&nbsp;=&nbsp; <span translate>majority</span>&nbsp;
    <mat-chip color="accent">-2</mat-chip>&nbsp;=&nbsp;
    <span translate>undocumented</span>
</div>
<div class="spacer-top-10"></div>
<div class="width-600">
    <!-- Candidate values -->
    <div [ngClass]="getGridClass()" *ngFor="let candidate of data.options">
        <div class="candidate-name">
            {{ candidate.user.full_name }}
        </div>
        <div *ngFor="let key of optionPollKeys" class="votes">
            <mat-form-field>
                <input type="number"
                            matInput
                            [value]="getValue(key, candidate)"
                            (change)="setValue(key, candidate, $event.target.value)"
                        />
                        <mat-label> {{ key | translate }}</mat-label>
            </mat-form-field>
        </div>
    </div>
    <!-- Summary values -->
    <div *ngFor="let sumValue of sumValues" class="sum-value">
        <mat-form-field>
            <input
                type="number"
                matInput
                [value]="getSumValue(sumValue)"
                (change)="setSumValue(sumValue, $event.target.value)"
            />
            <mat-label>{{ pollService.getLabel(sumValue) | translate }}</mat-label>
        </mat-form-field>
    </div>
</div>
<div class="submit-buttons">
    <button mat-button (click)="submit()">{{ 'Save' | translate }}</button>
    <button mat-button (click)="cancel()">{{ 'Cancel' | translate }}</button>
</div>
