<?php

namespace App\Listeners;

use App\Domains\Workspace\Services\CurrentWorkspace;

class ResetCurrentWorkspace
{
    public function handle(object $event): void
    {
        $app = property_exists($event, 'sandbox') ? $event->sandbox : app();
        $app->make(CurrentWorkspace::class)->clear();
    }
}
