<?php

namespace App\View\Components;

use Illuminate\View\Component;
use Illuminate\View\View;

class SiteLayout extends Component
{
    /**
     * The page title.
     */
    public ?string $title;

    /**
     * The meta description for SEO.
     */
    public ?string $metaDescription;

    /**
     * Whether to show breadcrumbs.
     */
    public bool $showBreadcrumbs;

    /**
     * Theme CSS variables for dynamic theming.
     */
    public ?array $themeCssVariables;

    /**
     * Create a new component instance.
     */
    public function __construct(
        ?string $title = null,
        ?string $metaDescription = null,
        bool $showBreadcrumbs = true,
        ?array $themeCssVariables = null
    ) {
        $this->title = $title;
        $this->metaDescription = $metaDescription;
        $this->showBreadcrumbs = $showBreadcrumbs;
        $this->themeCssVariables = $themeCssVariables;
    }

    /**
     * Get the view / contents that represents the component.
     */
    public function render(): View
    {
        return view('components.layout.site');
    }
}