import { Component, computed, effect, inject, input, signal } from '@angular/core'; import { Router } from '@angular/router'; import { Article, ArticleService } from '../../core/data/article.service'; import { BookmarksStore } from '../../shared/state/bookmarks.store'; import { BookmarkIconComponent } from '../../shared/ui/bookmark-icon.component'; import { ChevronIconComponent } from '../../shared/ui/chevron-icon.component'; import { bodyReadouts } from './body-readouts'; import { BodyDetailViewModel } from './body-detail.model'; import { ReadoutSectionsComponent } from './readout-sections.component'; /** * Displays the real NASA data for the currently selected body/exoplanet: kind, physical * size/mass, orbital elements, and (for exoplanets) discovery year. Presentational only — * `BodyDetailSceneComponent` supplies the view model and owns navigation state. * * The rows come from `bodyReadouts` via `ReadoutSectionsComponent`, both shared with the system * view's object card so the same body cannot read differently in the two places it can be * inspected. */ @Component({ selector: 'app-info-panel', imports: [BookmarkIconComponent, ChevronIconComponent, ReadoutSectionsComponent], template: `
{{ readouts().kindLabel }} · {{ body().hostStarName }}
{{ found.extract }}
Wikipedia · {{ found.language }}@switch (aboutState()) { @case ('loading') { Asking Wikipedia… } @case ('none') { Wikipedia has no article on {{ body().name }}. } @case ('unavailable') { Wikipedia could not be reached. } }
} @else { }