<?php

namespace App\Http\Controllers;

use App\Models\PrivacyTermsSection;
use Illuminate\Http\Request;
use Inertia\Inertia;

class TermsPrivacyController extends Controller
{
    /**
     * Show the terms of service for the application.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Inertia\Response
     */
    public function showTerms(Request $request)
    {
        $terms = PrivacyTermsSection::where('page', 'terms')->get();

        return Inertia::render('TermsOfService', [
            'terms' => $terms,
        ]);
    }
    /**
     * Show the terms of service for the application.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Inertia\Response
     */
    public function showPolicy(Request $request)
    {
        $policy = PrivacyTermsSection::where('page', 'policy')->get();

        return Inertia::render('PrivacyPolicy', [
            'policy' => $policy,
        ]);
    }
}
