<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class SettingsController extends Controller
{
    /**
     * Show settings page
     */
    public function index()
    {
        return view('settings.index');
    }

    /**
     * Update profile
     */
    public function updateProfile(Request $request)
    {
        return redirect()->route('settings.index')->with('success', 'Profile updated!');
    }


    /**
     * Update notification preferences
     */
    public function updateNotifications(Request $request)
    {
        return redirect()->route('settings.index')->with('success', 'Notification preferences updated!');
    }

    /**
     * Upload avatar
     */
    public function uploadAvatar(Request $request)
    {
        return redirect()->route('settings.index')->with('success', 'Avatar uploaded!');
    }


    /**
 * Update profile
 */

/**
 * Update password
 */
public function updatePassword(Request $request)
{
    return redirect()->route('settings.index')->with('success', 'Password changed successfully!');
}


/**
 * Upload avatar
 */

/**
 * Delete account
 */
public function deleteAccount()
{
    return redirect()->route('landing')->with('success', 'Account deleted successfully!');
}

/**
 * Export user data
 */
public function exportData()
{
    return redirect()->back()->with('success', 'Data export started!');
}

/**
 * Two factor authentication
 */
public function twoFactorAuth()
{
    return view('settings.2fa');
}

/**
 * View active sessions
 */
public function sessions()
{
    return view('settings.sessions');
}

/**
 * View login activity
 */
public function loginActivity()
{
    return view('settings.login-activity');
}
}