<?php

namespace Modules\Gallery\Controllers\Web;


use Illuminate\Http\Request;
use Illuminate\View\View;
use App\Http\Controllers\Controller;
use Modules\Banner\Enums\BannerActiveStatusEnum;
use Modules\Banner\Enums\BannerStatusEnum;
use Modules\Banner\Services\BannerService;
use Modules\Brand\Enums\BrandBoolEnum;
use Modules\Brand\Services\BrandService;
use Modules\Category\Interfaces\CategoryRepositoryInterface;
use Modules\Category\Services\CategoryService;
use Modules\Gallery\Enums\GalleryStatusEnum;
use Modules\Gallery\Services\GalleryService;
use Modules\Package\Services\PackageService;
use Modules\Page\Models\Page;
use Modules\Page\Services\PageService;
use Modules\Category\Enums\CategoryShowFooterEnum;
use Modules\Partner\Services\PartnerService;
use Modules\Product\Enums\ProductStatusSoldEnum;
use Modules\Product\Interfaces\ProductRepositoryInterface;
use Modules\Product\Services\ProductService;
use Modules\Review\Services\ReviewService;
use Modules\Service\Services\ServiceService;
use Modules\Slider\Interfaces\SliderRepositoryInterface;
use Modules\Slider\Services\SliderService;
use Modules\User\Services\AccountService;

class GalleryController extends Controller
{
    private $view = 'web.pages.galleries.';
    /**
     * Create a new controller instance.
     *
     * @return void
     */

    public function __construct(
        private GalleryService $galleryService,
        private PageService $pageService,
    ){}

    /**
     * Show the application dashboard.
     * @return View
     */

    public function index(Request $request) :View
    {
        $title = __('web.gallery');
        $images = $this->galleryService->get([
            'typeStatus'=>GalleryStatusEnum::IMAGE->value
        ]);

        $videos = $this->galleryService->get([
            'typeStatus'=>
            [
                GalleryStatusEnum::VIDEO->value,
                GalleryStatusEnum::LINK->value
            ]
        ]);
        $image_page = $this->pageService->getItemById(2);
        $video_page = $this->pageService->getItemById(3);

        return view($this->view.'index', get_defined_vars());
    }

}
