/** Bundled app logo — used when no custom agent avatar is configured. */
export const DEFAULT_AGENT_AVATAR = "/logo192.png";

/** Inline SVG placeholder for user messages without a custom avatar. */
export const DEFAULT_USER_AVATAR =
	"data:image/svg+xml," +
	encodeURIComponent(
		'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">' +
			'<circle cx="16" cy="16" r="16" fill="#e8ecf0"/>' +
			'<circle cx="16" cy="12" r="5" fill="#94a3b8"/>' +
			'<path d="M6 28c0-5.5 4.5-10 10-10s10 4.5 10 10" fill="#94a3b8"/>' +
			"</svg>",
	);

export function resolveAvatarUrl(url: string | undefined | null, fallback: string): string {
	const trimmed = url?.trim();
	return trimmed || fallback;
}
