import { Component, input, computed } from '@angular/core'; @Component({ selector: 'app-movie-rating', standalone: false, templateUrl: './movie-rating.component.html', styleUrl: './movie-rating.component.css' }) export class MovieRatingComponent { rating = input(0); ratingColor = computed(() => { const r = this.rating(); if (r >= 18) return 'bg-red-500'; if (r >= 16) return 'bg-blue-500'; if (r >= 12) return 'bg-green-500'; if (r >= 6) return 'bg-yellow-300'; return 'bg-white'; }); ratingText = computed(() => `FSK ${this.rating()}`); }