<table class="table table-sm table-bordered table-striped">
    <thead>
        <tr>
        <th></th><th>Produkt</th><th>Kategoria</th><th>Cena</th>
        <th>Rabat</th><th></th>
        </tr>
    </thead>
    <tbody>
        <tr *paFor="let item of getProducts(); let i = index">
            <td>{{i + 1}}</td>
            <td>{{item.name}}</td>
            <td>{{item.category}}</td>
            <td>{{item.price | discount | currency:"PLN":"symbol":undefined:"pl-PL" }}</td>
            <td [pa-price]="item.price" #discount="discount">
                {{ discount.discountAmount | currency:"PLN":"symbol":undefined:"pl-PL" }}
            </td>
            <td class="text-center">
                <button class="btn btn-danger btn-sm" (click)="deleteProduct(item.id)">
                    Usuń
                </button>
            </td>
        </tr>
    </tbody>
</table>

<paDiscountEditor></paDiscountEditor>
<paDiscountDisplay></paDiscountDisplay>
