<?php

namespace App\Modules\Admin\Operations\Controllers;

use App\Http\Controllers\Controller;
use App\Modules\Admin\Operations\Services\SupportImpersonationService;
use Illuminate\Http\RedirectResponse;

class SupportImpersonationEndController extends Controller
{
    public function store(SupportImpersonationService $impersonation): RedirectResponse
    {
        $impersonation->end();

        return redirect()->route('admin.dashboard')->with('status', __('operations.impersonation_ended'));
    }
}
