import Component from '@glimmer/component'; import { on } from '@ember/modifier'; import { fn } from '@ember/helper'; import or from 'ember-truth-helpers/helpers/or'; import formatRelativeDate from '../helpers/format-relative-date'; export default class ContributionPhoto extends Component { get item() { return this.args.item; } get primaryPhoto() { return this.item?.photos?.[0] || null; } get extraPhotoCount() { return Math.max(0, (this.item?.photos?.length || 0) - 1); } get placeName() { return this.item?.placeName; } get isNameLoading() { return this.item?.placeNameLoading; } get tags() { // Collect unique tags across all photos in the contribution group const all = (this.item?.photos || []).flatMap((p) => p.tags || []); return [...new Set(all)]; } }