<?php

namespace Mtc\Shop\Events;

/**
 * Dispatched when item data is assembled for display.
 * Accepts both legacy Item (global class) and Eloquent Mtc\Shop\Item
 * since the detail page uses the legacy class and the browse page uses Eloquent.
 */
class ShopItemDataEvent
{
    protected object $item;
    protected string $context;

    public function __construct(object $item, string $context)
    {
        $this->item = $item;
        $this->context = $context;
    }

    public function getItem(): object
    {
        return $this->item;
    }

    public function getContext(): string
    {
        return $this->context;
    }
}
