import 'package:flutter/material.dart';
import 'package:flux/features/tickets/models/ticket_model.dart';

extension TicketStatusVisuals on TicketStatus {
  Color get color {
    switch (this) {
      case TicketStatus.open:
        return Colors.blueGrey;
      case TicketStatus.waitingForParts ||
          TicketStatus.waitingForQuote ||
          TicketStatus.waitingForCustomer:
        return Colors.amber.shade700;
      case TicketStatus.inProgress:
        return Colors.blue;
      case TicketStatus.waitingForShipping:
        // Il tuo rosa storico!
        return Colors.pinkAccent;
      case TicketStatus.waitingForReturn:
        return Colors.purpleAccent;
      case TicketStatus.ready:
        return Colors.green;
      case TicketStatus.closed:
        return Colors.grey.shade400;
    }
  }

  IconData get icon {
    switch (this) {
      case TicketStatus.open:
        return Icons.inbox;
      case TicketStatus.waitingForParts ||
          TicketStatus.waitingForQuote ||
          TicketStatus.waitingForCustomer:
        return Icons.hourglass_empty;
      case TicketStatus.inProgress:
        return Icons.build;
      case TicketStatus.waitingForShipping:
        return Icons.local_shipping_outlined;
      case TicketStatus.waitingForReturn:
        return Icons.undo;
      case TicketStatus.ready:
        return Icons.check_circle_outline;
      case TicketStatus.closed:
        return Icons.lock_outline;
    }
  }
}
