{#if node instanceof GPXFile} {node.metadata.name} {#each node.children as child, i} {/each} {#if node.wpt.length > 0} Waypoints {#each node.wpt as wpt, i} {wpt.name ?? `Waypoint ${i + 1}`} {/each} {/if} {:else if node instanceof Track} {node.name ?? `Track ${index + 1}`} {#each node.children as child, i} {/each} {:else if node instanceof TrackSegment} {`Segment ${index + 1}`} {/if}