import { Component, CUSTOM_ELEMENTS_SCHEMA, inject } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Products } from '../products.service';

@Component({
  selector: 'app-productconfigpage',
  imports: [],
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  templateUrl: './productconfigpage.html',
  styleUrl: './productconfigpage.scss',
})
export class Productconfigpage {
  private selectedProduct = inject(ActivatedRoute);
  productService = inject(Products);

  productId = this.selectedProduct.snapshot.paramMap.get('id');
  product = this.productService.getProductList().find((p) => p.id === Number(this.productId));
}
