/**
 * Dev-only role stand-in. This POC has one faked self-service user and no real
 * identities, so the two-person letter workflow (drafter vs approver) is driven by
 * a `?role=` query param — exactly the pattern of the `?scenario=` toggle. The
 * backend receives it as an `X-Role` header (see role.interceptor) and enforces the
 * approver≠drafter rule; the FE derives `editable` from it.
 */
export type Role = 'drafter' | 'approver';

export function currentRole(): Role {
  return new URLSearchParams(window.location.search).get('role') === 'approver' ? 'approver' : 'drafter';
}
