import { useMemo } from 'react' import { Check, AlertTriangle, X } from 'lucide-react' import { parseMultipleUrls, type ParsedId } from '@/lib/urlParser' interface ParsedIdListProps { value: string platform: string type: 'detail' | 'creator' onRemove?: (index: number) => void disabled?: boolean } export function ParsedIdList({ value, platform, type, onRemove, disabled }: ParsedIdListProps) { const parsed = useMemo(() => { return parseMultipleUrls(value, platform) }, [value, platform]) if (parsed.length === 0) return null const handleRemove = (index: number) => { if (disabled || !onRemove) return const items = value .split(/[,\n]+/) .map(s => s.trim()) .filter(Boolean) items.splice(index, 1) onRemove(index) } return (