<?php

namespace App\Components\Client\Witness;

use App\Models\Client\Client;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Livewire\Component;

/**
 * Landing page for the Witness Statement design exercise. Lists the four
 * concepts (each independently navigable) and links to the comparison page.
 */
class WitnessDesignIndex extends Component
{
    use AuthorizesRequests;

    public Client $client;

    public function mount(Client $client): void
    {
        $this->authorize('clients.witness.view');
        $this->client = $client;
    }

    public function render()
    {
        return view('components.client.witness.design.index', [
            'concepts' => $this->concepts(),
        ])->layout('layouts.dashboard');
    }

    /** @return array<int, array<string, string>> */
    protected function concepts(): array
    {
        return [
            [
                'name' => 'Three-column workspace',
                'route' => 'clients.witness.concept.workspace',
                'icon' => 'view-column-outline',
                'tagline' => 'Evidence · Questionnaire · Actions, all on one screen.',
                'best' => 'Experienced handlers on a wide screen.',
                'recommended' => '1',
            ],
            [
                'name' => 'Guided step-by-step builder',
                'route' => 'clients.witness.concept.builder',
                'icon' => 'format-list-numbered',
                'tagline' => 'One group per step with a review-before-generate finish.',
                'best' => 'Live client interviews and mobile use.',
                'recommended' => '',
            ],
            [
                'name' => 'Document-first split view',
                'route' => 'clients.witness.concept.split',
                'icon' => 'file-document-multiple-outline',
                'tagline' => 'Source document beside the editable statement.',
                'best' => 'Document-heavy, high-scrutiny drafting.',
                'recommended' => '',
            ],
            [
                'name' => 'Review dashboard',
                'route' => 'clients.witness.concept.dashboard',
                'icon' => 'view-dashboard-outline',
                'tagline' => 'Triage by outstanding issues, review status and completion.',
                'best' => 'QA and pre-generation sign-off.',
                'recommended' => '',
            ],
        ];
    }
}
