import lookup from '../../lookup';

class {
    onMount() {
        var item = this.input.item;
        lookup.addComponent(item.id, this);
    }

    emitPurchase() {
        var item = this.input.item;
        this.emit('purchase', item);
    }
}

$ var item = input.item;

<div.item>
    <span.title>${item.title}</span>
</div>