import { SelectedSeatsService } from './../selected-seats.service'; import { Component, computed, inject, input } from '@angular/core'; import { Sitzkategorie } from '@infinimotion/model-frontend'; @Component({ selector: 'app-seat-selection', standalone: false, templateUrl: './seat-selection.component.html', styleUrl: './seat-selection.component.css' }) export class SeatSelectionComponent { seatCategory = input.required(); SelectedSeatsService = inject(SelectedSeatsService); selectedSeatsByCategory = computed(() => this.SelectedSeatsService.getSelectedSeatsByCategory(this.seatCategory().id).length ); totalPrice = computed(() => this.selectedSeatsByCategory() * this.seatCategory().price ); getPriceDisplay(price: number): string { return `${(price / 100).toFixed(2)} €`; } }