/**
 * Whether this screen may write right now.
 *
 * Only while connected. When RazorBooking is unreachable the screens still
 * render — from the last copy this site cached — but that copy may be stale,
 * and a toggle flipped against stale data is a write the merchant cannot see
 * the consequence of. So every write control is disabled, the banner says
 * edits are paused, and nothing is queued or retried behind their back.
 */

import type { Connection } from './types';

export function isWritable( connection: Connection ): boolean {
	return connection.status === 'connected';
}
