import { Eye, Pencil, Shield } from 'lucide-react'; import type { CalendarPermission } from '@/types'; const config: Record = { read_only: { label: 'Read Only', icon: Eye, bg: 'bg-blue-500/10', text: 'text-blue-400' }, create_modify: { label: 'Create/Modify', icon: Pencil, bg: 'bg-amber-500/10', text: 'text-amber-400' }, full_access: { label: 'Full Access', icon: Shield, bg: 'bg-green-500/10', text: 'text-green-400' }, }; interface PermissionBadgeProps { permission: CalendarPermission; showIcon?: boolean; } export default function PermissionBadge({ permission, showIcon = true }: PermissionBadgeProps) { const c = config[permission]; const Icon = c.icon; return ( {showIcon && } {c.label} ); }