<?php

namespace App\Http\Controllers;

use App\Services\DummyDataService;
use Illuminate\Http\Request;

class RiwayatController extends Controller
{
    /**
     * Menampilkan halaman riwayat peminjaman offline.
     */
    public function offlineIndex()
    {
        $riwayatOffline = DummyDataService::getRiwayatOffline();

        return view('riwayat.offline', [
            'pageTitle' => 'Riwayat Peminjaman Offline',
            'riwayatOffline' => $riwayatOffline,
        ]);
    }

    /**
     * Menampilkan halaman riwayat baca online.
     */
    public function onlineIndex()
    {
        $riwayatOnline = DummyDataService::getRiwayatOnline();

        return view('riwayat.online', [
            'pageTitle' => 'Riwayat Baca Online',
            'riwayatOnline' => $riwayatOnline,
        ]);
    }
}