<?php

declare(strict_types=1);

namespace App\Http\Controllers\Web;

use App\Http\Controllers\Controller;
use App\Support\Seo\SeoFactory;
use Illuminate\Http\Request;
use Inertia\Inertia;
use Inertia\Response;

final class ProfileHelpPageController extends Controller
{
    public function __invoke(Request $request): Response
    {
        $canonical = route('help.profile');
        $seo = app(SeoFactory::class)
            ->collectionPage(
                'Profile Help — Skinbase',
                'Learn how profiles work on Skinbase Nova, how they differ from Groups, and how to build a stronger personal identity with better setup, presentation, and creator-facing profile habits.',
                $canonical,
            )
            ->toArray();

        $seo['og_type'] = 'article';

        return Inertia::render('Help/ProfileHelpPage', [
            'title' => 'Profile Help',
            'description' => 'Understand your Skinbase profile as your personal public identity, with practical guidance for setup, presentation, profile content, and creator-friendly best practices.',
            'seo' => $seo,
            'links' => [
                'help_home' => route('help'),
                'groups_help' => route('help.groups'),
                'studio_help' => route('help.studio'),
                'upload_help' => route('help.upload'),
                'cards_help' => route('help.cards'),
                'profile_settings' => route('dashboard.profile'),
                'open_studio' => route('studio.index'),
                'help_auth' => route('help.auth'),
                'login' => route('login'),
                'register' => route('register'),
                'contact_support' => route('contact.show'),
                'report_issue' => route('bug-report'),
            ],
            'auth' => [
                'signed_in' => $request->user() !== null,
            ],
        ])->rootView('collections');
    }
}