{#if alerts.length} {/if} {#if isLoading} {:else if dataAge}

Updated: {dataAge.toLocaleTimeString()}

{#if services.length} {#each services as service} {/each}
From To Plat. Sch Arr. Exp Arr. Sch Dep. Exp Dep.
{#if Array.isArray(service.origin?.location)} {service.origin.location[0]['locationName'] + ' & ' + service.origin.location[1]['locationName']} {:else} {service.origin?.location?.locationName || ''} {/if} {#if Array.isArray(service.destination?.location)} {service.destination.location[0]['locationName'] + ' & ' + service.destination.location[0]['locationName']} {:else} {service.destination?.location?.locationName || ''} {/if} {service.platform || '-'} {parseTime(service.sta).data} {parseTime(service.eta).data} {parseTime(service.std).data} {parseTime(service.etd).data}

A {service.operator || 'Unknown'} service {#if service['length']} with {service['length'] || 'some'} coaches {/if}

{#if service.delayReason}

{service.delayReason}

{/if} {#if service.cancelReason}

{service.cancelReason}

{/if}
{:else}

No Scheduled Train Services

{/if} {#if busServices.length}
Bus services
Bus Services {#each busServices as service} {/each}
From To Sch Arr. Exp Arr. Sch Dep. Exp Dep.
{service.origin?.location?.locationName || ''} {service.destination?.location?.locationName || ''} {parseTime(service.sta).data} {parseTime(service.eta).data} {parseTime(service.std).data} {parseTime(service.etd).data}

A {service.operator || 'Unknown'} service

{#if service.delayReason}

{service.delayReason}

{/if} {#if service.cancelReason}

{service.cancelReason}

{/if}
{/if} {#if ferryServices.length}
Bus services
Ferry Services {#each ferryServices as service} {/each}
From To Sch Arr. Exp Arr. Sch Dep. Exp Dep.
{service.origin?.location?.locationName || ''} {service.destination?.location?.locationName || ''} {parseTime(service.sta).data} {parseTime(service.eta).data} {parseTime(service.std).data} {parseTime(service.etd).data}
{#if service.delayReason}

{service.delayReason}

{/if} {#if service.cancelReason}

{service.cancelReason}

{/if}
{/if} {:else}

Unable to find this station

{/if} {#if serviceDetail}
Service Detail
{#if serviceDetail?.previousCallingPoints?.callingPointList?.callingPoint} {#if Array.isArray(serviceDetail?.previousCallingPoints?.callingPointList?.callingPoint)} {#each serviceDetail.previousCallingPoints.callingPointList.callingPoint as prevPoint} {/each} {:else} {/if} {/if} {#if serviceDetail?.subsequentCallingPoints?.callingPointList?.callingPoint} {#if Array.isArray(serviceDetail?.subsequentCallingPoints?.callingPointList?.callingPoint)} {#each serviceDetail.subsequentCallingPoints.callingPointList.callingPoint as nextPoint} {/each} {:else} {/if} {/if}
Location Sch Exp
{prevPoint.locationName} {prevPoint.st} {parseTime(prevPoint.at || prevPoint.et).data}
{serviceDetail.previousCallingPoints.callingPointList .callingPoint.locationName} {serviceDetail.previousCallingPoints.callingPointList .callingPoint.st} {parseTime( serviceDetail.previousCallingPoints.callingPointList .callingPoint.at || serviceDetail.previousCallingPoints.callingPointList .callingPoint.et ).data}
{title} {serviceDetail.std || serviceDetail.sta} {parseTime(serviceDetail.etd || serviceDetail.eta).data}
{nextPoint.locationName} {nextPoint.st} {parseTime(nextPoint.et).data}
{serviceDetail.subsequentCallingPoints.callingPointList .callingPoint.locationName} {serviceDetail.subsequentCallingPoints.callingPointList .callingPoint.st} {parseTime( serviceDetail.subsequentCallingPoints.callingPointList .callingPoint.et ).data}
{/if}