import type { Ticket } from "@/payload-types"; import { Badge } from "@/components/ui/badge"; import { cn } from "@/lib/utils"; import { CATEGORY_LABEL, CATEGORY_STYLES, PRIORITY_LABEL, PRIORITY_STYLES, STATUS_LABEL, STATUS_STYLES, type TicketCategory, type TicketPriority, type TicketStatus, } from "@/lib/tickets/ticketMeta"; interface TicketStatusBadgeProps { readonly status: TicketStatus; } interface TicketPriorityBadgeProps { readonly priority: TicketPriority; } interface TicketCategoryBadgeProps { readonly category: TicketCategory; } interface TicketBadgesProps { readonly ticket: Pick; } const badgeTextClass = "text-[10px] uppercase tracking-wide"; export function TicketStatusBadge({ status }: TicketStatusBadgeProps) { return ( {STATUS_LABEL[status]} ); } export function TicketPriorityBadge({ priority }: TicketPriorityBadgeProps) { return ( {PRIORITY_LABEL[priority]} ); } export function TicketCategoryBadge({ category }: TicketCategoryBadgeProps) { return ( {CATEGORY_LABEL[category]} ); } export function TicketBadges({ ticket }: TicketBadgesProps) { return (
); }