/** * Status Configuration Constants * * UI display configurations for various status enums. * These provide consistent styling and labels across the application. * * @layer Domain */ import { AnalysisStatus, PageStatus, ElementType, TenantStatus, DiscoverySource } from '../entities'; /** * Analysis Status Display Configuration */ export const ANALYSIS_STATUS_CONFIG: Record< AnalysisStatus, { label: string; color: string; bgColor: string } > = { [AnalysisStatus.NONE]: { label: 'Not Analyzed', color: 'text-gray-600', bgColor: 'bg-gray-100', }, [AnalysisStatus.PENDING]: { label: 'Pending', color: 'text-yellow-600', bgColor: 'bg-yellow-100', }, [AnalysisStatus.IN_PROGRESS]: { label: 'In Progress', color: 'text-blue-600', bgColor: 'bg-blue-100', }, [AnalysisStatus.ANALYZED]: { label: 'Analyzed', color: 'text-green-600', bgColor: 'bg-green-100', }, [AnalysisStatus.OUTDATED]: { label: 'Outdated', color: 'text-orange-600', bgColor: 'bg-orange-100', }, [AnalysisStatus.FAILED]: { label: 'Failed', color: 'text-red-600', bgColor: 'bg-red-100', }, }; /** * Page Status Display Configuration */ export const PAGE_STATUS_CONFIG: Record< PageStatus, { label: string; color: string; bgColor: string } > = { [PageStatus.ACTIVE]: { label: 'Active', color: 'text-green-600', bgColor: 'bg-green-100', }, [PageStatus.EXCLUDED]: { label: 'Excluded', color: 'text-gray-600', bgColor: 'bg-gray-100', }, [PageStatus.BROKEN]: { label: 'Broken', color: 'text-red-600', bgColor: 'bg-red-100', }, [PageStatus.REDIRECT]: { label: 'Redirect', color: 'text-yellow-600', bgColor: 'bg-yellow-100', }, }; /** * Tenant Status Display Configuration */ export const TENANT_STATUS_CONFIG: Record< TenantStatus, { label: string; color: string; bgColor: string } > = { [TenantStatus.ACTIVE]: { label: 'Active', color: 'text-green-600', bgColor: 'bg-green-100', }, [TenantStatus.SUSPENDED]: { label: 'Suspended', color: 'text-yellow-600', bgColor: 'bg-yellow-100', }, [TenantStatus.ARCHIVED]: { label: 'Archived', color: 'text-gray-600', bgColor: 'bg-gray-100', }, }; /** * Discovery Source Display Configuration */ export const DISCOVERY_SOURCE_CONFIG: Record< DiscoverySource, { label: string; color: string; bgColor: string } > = { [DiscoverySource.MANUAL]: { label: 'Manual', color: 'text-purple-600', bgColor: 'bg-purple-100', }, [DiscoverySource.CRAWL]: { label: 'Crawler', color: 'text-green-600', bgColor: 'bg-green-100', }, [DiscoverySource.LINK_EXTRACTION]: { label: 'Link Extraction', color: 'text-blue-600', bgColor: 'bg-blue-100', }, [DiscoverySource.PLUGIN]: { label: 'Plugin', color: 'text-indigo-600', bgColor: 'bg-indigo-100', }, }; /** * Element Type Display Configuration */ export const ELEMENT_TYPE_CONFIG: Record< ElementType, { label: string; color: string; bgColor: string; icon: string } > = { [ElementType.BUTTON]: { label: 'Button', color: 'text-blue-600', bgColor: 'bg-blue-100', icon: '🔘', }, [ElementType.INPUT]: { label: 'Input', color: 'text-green-600', bgColor: 'bg-green-100', icon: '📝', }, [ElementType.LINK]: { label: 'Link', color: 'text-purple-600', bgColor: 'bg-purple-100', icon: '🔗', }, [ElementType.SELECT]: { label: 'Select', color: 'text-indigo-600', bgColor: 'bg-indigo-100', icon: '📋', }, [ElementType.TEXTAREA]: { label: 'Textarea', color: 'text-teal-600', bgColor: 'bg-teal-100', icon: '📄', }, [ElementType.CHECKBOX]: { label: 'Checkbox', color: 'text-cyan-600', bgColor: 'bg-cyan-100', icon: '☑️', }, [ElementType.RADIO]: { label: 'Radio', color: 'text-violet-600', bgColor: 'bg-violet-100', icon: '⭕', }, [ElementType.FORM]: { label: 'Form', color: 'text-orange-600', bgColor: 'bg-orange-100', icon: '📋', }, [ElementType.IMAGE]: { label: 'Image', color: 'text-pink-600', bgColor: 'bg-pink-100', icon: '🖼️', }, [ElementType.VIDEO]: { label: 'Video', color: 'text-red-600', bgColor: 'bg-red-100', icon: '🎥', }, [ElementType.CUSTOM]: { label: 'Custom', color: 'text-gray-600', bgColor: 'bg-gray-100', icon: '⚙️', }, };