// Interrogation feedback moments: the floating suspicion delta and the slam-in
// banner when a suspect's lie cracks for the first time.
import { Stamp } from './components'

export function DeltaFloater({ delta }: { delta: number }) {
  const big = Math.abs(delta) >= 12
  const cls = 'delta-float' + (delta < 0 ? ' delta-float--drop' : big ? ' delta-float--big' : '')
  return <span class={cls}>{delta > 0 ? `+${delta}` : `${delta}`}</span>
}

export function CrackBanner() {
  return (
    <div class="crack-banner">
      <div class="crack-banner__flash" />
      <Stamp slam style={{ fontSize: 'clamp(16px,4vw,26px)' }}>THE LIE CRACKS</Stamp>
    </div>
  )
}
