import { Component, inject, ChangeDetectionStrategy } from '@angular/core';
import { DecimalPipe } from '@angular/common';
import { BonRedemptionStore } from '@isa/crm/data-access';

/**
 * Smart component for displaying validated Bon details.
 *
 * Injects BonRedemptionStore to access validated Bon data.
 *
 * Shows:
 * - Bon date
 * - Total amount
 *
 * @example
 * <crm-bon-details-display />
 */
@Component({
  selector: 'crm-bon-details-display',
  imports: [DecimalPipe],
  templateUrl: './bon-details-display.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class BonDetailsDisplayComponent {
  /**
   * Store for accessing validated Bon data
   */
  readonly store = inject(BonRedemptionStore);
}
