---
import Icon from './Icon.astro';
interface Props {
tone?: 'note' | 'finding' | 'warning' | 'danger';
/** Override the tone's default kind label. */
label?: string;
}
const { tone = 'note', label } = Astro.props;
/**
* Flat plate, a 2px accent rule, mono eyebrow — the archive's callout, ported
* from the main site's Callout. Four tones, each with its own kind mark.
*/
const TONES = {
note: { color: 'var(--pine)', icon: 'info', label: 'Note' },
finding: { color: 'var(--foam)', icon: 'check', label: 'Finding' },
warning: { color: 'var(--gold)', icon: 'warn', label: 'Warning' },
danger: { color: 'var(--love)', icon: 'close', label: 'Danger' },
} as const;
const t = TONES[tone];
---
<div class="dcallout" style={`--tone: ${t.color};`}>
<div class="dcallout__label"><Icon name={t.icon} /> {label ?? t.label}</div>
<div class="dcallout__body"><slot /></div>
</div>