// Shared content renderer for the post-login and post-tenant-switch // NotifyPlugin cards. Both cards present the same shape ("you are in // as "), so we render them with a unified visual // language — a neutral chip for the workspace name and a role-coloured // chip for the role — instead of plain interpolated text. // // The renderer interpolates a template string carrying `{name}` and // optionally `{role}` placeholders. Everything around those placeholders // is rendered verbatim, which lets translators reorder the sentence // however their language wants without further code changes. // // Why not just pass html to NotifyPlugin's `content` string? // TDesign's plugin treats `content` as text. Passing a render function // (TNode) is the supported way to inject styled VNodes; doing it // through a shared helper keeps the chip styles in one place rather // than scattered across two call sites. import { h, type VNode } from 'vue' import { Icon as TIcon } from 'tdesign-vue-next' // Inline styles (rather than a global stylesheet) because NotifyPlugin // renders into a teleported overlay outside any scoped