--- import type { Service, Group } from '../data/rules'; import { getRuleCount, getGroupSlug, getServiceSlug } from '../data/rules'; interface Props { service: Service; group: Group; base: string; } const { service, group, base } = Astro.props; const ruleCount = getRuleCount(service); const groupSlug = getGroupSlug(group); const serviceSlug = getServiceSlug(service); const href = `${base}/rules/${groupSlug}/${serviceSlug}/`; const exporterNames = service.exporters .map((e) => e.name) .filter(Boolean) .slice(0, 3); ---

{service.name}

{ruleCount} rule{ruleCount !== 1 ? 's' : ''}
{exporterNames.length > 0 && (

{exporterNames.join(' ยท ')}{service.exporters.length > 3 ? ` +${service.exporters.length - 3}` : ''}

)}