'use client'; import { motion } from 'framer-motion'; import { ArrowSquareOut as ExternalLink, Cube as Box } from '@phosphor-icons/react'; import type { UniprotSummary } from '@/types/pipeline'; import { fadeUp, cardHover } from '@/lib/animations'; interface UniprotPanelProps { data: UniprotSummary | null; } export function UniprotPanel({ data }: UniprotPanelProps) { if (!data) return null; const isUniprot = /^[OPQ][0-9][A-Z0-9]{3}[0-9]$|^A0A[A-Z0-9]{5,}[0-9]$/.test(data.accession); const isNcbi = /^([NXYP]P_|[NXYP]M_|XM_|XR_|NR_)/.test(data.accession); return (

{data.full_name}

{data.accession} {data.organism}
{isUniprot && ( UniProt )} {!isUniprot && isNcbi && ( NCBI )}
{data.gene_names?.length > 0 && (

Gene

{data.gene_names.map(g => {g})}
)} {data.subcellular_locations?.length > 0 && (

Location

{data.subcellular_locations.map(loc => {loc})}
)}
{data.keywords?.length > 0 && (

Keywords

{data.keywords.map(kw => {kw})}
)}
{data.pdb_ids?.length > 0 && (

PDB Structures ({data.pdb_ids.length})

{data.pdb_ids.slice(0, 12).map(pdb => ( {pdb} ))} {data.pdb_ids.length > 12 && +{data.pdb_ids.length - 12} more}
)} {data.functions?.length > 0 && (

Function

{data.functions.map((f, fi) =>

{f}

)}
)} {data.features?.length > 0 && (

Active Sites & Features

{data.features.map((f, fi) => (
{f.type}: {f.description} {(f.begin || f.end) && ({f.begin}–{f.end})}
))}
)} {data.go_terms?.length > 0 && (

GO Terms

{data.go_terms.slice(0, 15).map((go, i) => ( {go} ))} {data.go_terms.length > 15 && +{data.go_terms.length - 15} more}
)}
); }