<?php

namespace App\View\Components\Grocery;

use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
use App\Repositories\Catalog\GenderRepository;

class FeaturedCategories extends Component
{
    protected $genders = [];

    /**
     * Create a new component instance.
     */
    public function __construct(GenderRepository $genderRepository)
    {
        $this->genders = $genderRepository->getList([]);
    }

    /**
     * Get the view / contents that represent the component.
     */
    public function render(): View|Closure|string
    {
        return view('components.grocery.featured-categories',[
            "genders" => $this->genders,
        ]);
    }
}
