import { useId, useState, type CSSProperties, type ReactNode } from 'react'; import { Link } from 'react-router-dom'; import { NumberInput } from '../NumberInput'; import { Pagination } from '../Paginated'; import { usePagination } from '../../hooks/usePagination'; import { SPELL_DAMAGE_GROUPS, SPELL_DAMAGE_SPECIALS } from '../../lib/format'; import { ABILITY_ORDER, DAMAGE_SCALING_LABELS, MAX_GEAR_LEVEL } from '../../lib/previewCalc'; import { landingFrom, matchesSearch, scoreField, type MonsterInput, type SpellLanding } from '../../lib/campaignEntries'; import type { Ability, Monster, MonsterAttack } from '../../api/types'; // A labelled field in a pop-out form. The child is handed the id its label points at. export function Field({ label, style, children }: { label: string; style?: CSSProperties; children: (id: string) => ReactNode }) { const id = useId(); return (
{available.length === 0 ? 'Everything in the library is already in this campaign.' : 'No matches.'}
)}{emptyText}
; return ( <> { setQuery(e.target.value); setPage(1); }} />No {noun} match "{query}".
}