<?php

namespace App\Livewire\Settings;

use Livewire\Attributes\Layout;
use Livewire\Attributes\Url;
use Livewire\Component;

#[Layout('layouts.app')]
class Index extends Component
{
    #[Url]
    public string $tab = 'profile';

    public bool $openRecoveryModal = false;

    public function mount(): void
    {
        if (session('open_recovery_modal')) {
            $this->tab = 'security';
            $this->openRecoveryModal = true;
        }
    }

    public function render()
    {
        return view('livewire.settings.index')->title(__('settings.title'));
    }
}
