--- import type { ShowProps } from '../../types'; type Props = Omit & { class?: string; }; const { when, class: className } = Astro.props; // For CSR, we need to serialize the when prop // String values ('signed-in', 'signed-out') are used as-is // Object values are serialized as data attributes const isStringWhen = typeof when === 'string'; const whenCondition = isStringWhen ? when : null; const role = !isStringWhen && typeof when === 'object' ? when.role : undefined; const permission = !isStringWhen && typeof when === 'object' ? when.permission : undefined; const feature = !isStringWhen && typeof when === 'object' ? when.feature : undefined; const plan = !isStringWhen && typeof when === 'object' ? when.plan : undefined; ---