<?php

namespace App\Livewire\Admin;

use LivewireUI\Modal\ModalComponent;

/**
 * Confirmation before an operator's own two-factor login is removed (R23).
 * No mutation here — TwoFactorSetup::disableTwoFactor() still runs its own
 * requireConfirmedPassword() check, unchanged.
 */
class ConfirmDisableTwoFactor extends ModalComponent
{
    public function confirm(): void
    {
        $this->dispatch('two-factor-disable-confirmed');
        $this->closeModal();
    }

    public function render()
    {
        return view('livewire.admin.confirm-disable-two-factor');
    }
}
