<?php

declare(strict_types=1);

namespace App\Http\Controllers\Web;

use App\Http\Controllers\Controller;
use Illuminate\View\View;

/**
 * FooterController — serves static footer pages.
 *
 * /faq                  → faq()
 * /rules-and-guidelines → rules()
 * /privacy-policy       → privacyPolicy()
 * /terms-of-service     → termsOfService()
 */
final class FooterController extends Controller
{
    public function faq(): View
    {
        return view('web.faq', [
            'page_title'            => 'FAQ — Skinbase',
            'page_meta_description' => 'Frequently Asked Questions about Skinbase — the community for skins, wallpapers, and photography.',
            'page_canonical'        => url('/faq'),
            'faq_schema'            => [[
                '@context' => 'https://schema.org',
                '@type' => 'FAQPage',
                'mainEntity' => [
                    [
                        '@type' => 'Question',
                        'name' => 'What is Skinbase?',
                        'acceptedAnswer' => [
                            '@type' => 'Answer',
                            'text' => 'Skinbase is a community gallery for desktop customisation including skins, themes, wallpapers, icons, and more.',
                        ],
                    ],
                    [
                        '@type' => 'Question',
                        'name' => 'Is Skinbase free to use?',
                        'acceptedAnswer' => [
                            '@type' => 'Answer',
                            'text' => 'Yes. Browsing and downloading are free, and registering is also free.',
                        ],
                    ],
                    [
                        '@type' => 'Question',
                        'name' => 'Who runs Skinbase?',
                        'acceptedAnswer' => [
                            '@type' => 'Answer',
                            'text' => 'Skinbase is maintained by a small volunteer staff team.',
                        ],
                    ],
                ],
            ]],
            'hero_title'            => 'Frequently Asked Questions',
            'hero_description'      => 'Answers to the most common questions from our members. Last updated March 1, 2026.',
            'breadcrumbs'           => collect([
                (object) ['name' => 'Home', 'url' => '/'],
                (object) ['name' => 'FAQ', 'url' => '/faq'],
            ]),
            'center_content'       => true,
            'center_max'           => '3xl',
        ]);
    }

    public function rules(): View
    {
        return view('web.rules', [
            'page_title'            => 'Rules & Guidelines — Skinbase',
            'page_meta_description' => 'Read the Skinbase community rules and content guidelines before submitting your work.',
            'page_canonical'        => url('/rules-and-guidelines'),
            'hero_title'            => 'Rules & Guidelines',
            'hero_description'      => 'Please review these guidelines before uploading or participating. Last updated March 1, 2026.',
            'breadcrumbs'           => collect([
                (object) ['name' => 'Home', 'url' => '/'],
                (object) ['name' => 'Rules & Guidelines', 'url' => '/rules-and-guidelines'],
            ]),
            'center_content'       => true,
            'center_max'           => '3xl',
        ]);
    }

    public function termsOfService(): View
    {
        return view('web.terms-of-service', [
            'page_title'            => 'Terms of Service — Skinbase',
            'page_meta_description' => 'Read the Skinbase Terms of Service — the agreement that governs your use of the platform.',
            'page_canonical'        => url('/terms-of-service'),
            'hero_title'            => 'Terms of Service',
            'hero_description'      => 'The agreement between you and Skinbase that governs your use of the platform. Last updated March 1, 2026.',
            'breadcrumbs'           => collect([
                (object) ['name' => 'Home', 'url' => '/'],
                (object) ['name' => 'Terms of Service', 'url' => '/terms-of-service'],
            ]),
            'center_content'       => true,
            'center_max'           => '3xl',
        ]);
    }

    public function privacyPolicy(): View
    {
        return view('web.privacy-policy', [
            'page_title'            => 'Privacy Policy — Skinbase',
            'page_meta_description' => 'Read the Skinbase privacy policy to understand how we collect and use your data.',
            'page_canonical'        => url('/privacy-policy'),
            'hero_title'            => 'Privacy Policy',
            'hero_description'      => 'How Skinbase collects, uses, and protects your information. Last updated March 1, 2026.',
            'breadcrumbs'           => collect([
                (object) ['name' => 'Home', 'url' => '/'],
                (object) ['name' => 'Privacy Policy', 'url' => '/privacy-policy'],
            ]),
            'center_content'       => true,
            'center_max'           => '3xl',
        ]);
    }
}
