import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { Product } from '../../../../../core/products/models/product-domain.model';
import { TranslatePipe } from '../../../../../i18n/translate.pipe';
import { cleanDescription } from '../../../../../utils/item.utils';

@Component({
  selector: 'app-product-description',
  standalone: true,
  imports: [TranslatePipe],
  templateUrl: './product-description.component.html',
  styleUrls: ['./product-description.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class ProductDescriptionComponent {
  @Input({ required: true }) product!: Product;
  @Input() simpleDescription = '';

  readonly cleanDescription = cleanDescription;
}
