+ {#if message.parentId !== null && message.parentId in history.messages && (history.messages[message.parentId]?.childrenIds.length ?? 0) > 1}
+
+
+
+
+ {history.messages[message.parentId].childrenIds.indexOf(
+ message.id
+ ) + 1} / {history.messages[message.parentId].childrenIds
+ .length}
+
+
+
+
+ {:else if message.parentId === null && Object.values(history.messages).filter((message) => message.parentId === null).length > 1}
+
+
+
+
+ {Object.values(history.messages)
+ .filter((message) => message.parentId === null)
+ .map((message) => message.id)
+ .indexOf(message.id) + 1} / {Object.values(
+ history.messages
+ ).filter((message) => message.parentId === null).length}
+
+
+
+
+ {/if}
+