<template>
	<tr>
            <td>{{ this.producto.nombre }}</td>
            <td class="has-text-right">{{ this.producto.pivot.cantidad }}</td>
            <td class="has-text-right">{{ Math.ceil(this.producto.pivot.total) }}</td>
            <td><button @click.capture="eliminarProducto()" class="button is-danger">
                <span class="icon">
                    <i class="fas fa-trash-alt"></i>
                </span>
            </button></td>
    </tr>
</template>
<script>
	export default {
		props: {
	        producto: Object
	    },
	    methods: {
	        seleccionarProducto() {
	            Event.$emit("producto-seleccionado",this.producto);
	        },
	        eliminarProducto() {
	            Event.$emit("sync-subpedido", 0, this.producto.id);
	        }
        }
	}
</script>