<?php

namespace Modules\Page\Controllers\Web;

use App\Http\Controllers\Controller;
use App\Services\Response\ResponseService;
use Modules\Page\Services\PageService;
use Modules\Product\Services\ProductService;
use Modules\Rate\Requests\Web\RateRequest;
use Modules\Rate\Services\RateService;
use Modules\User\Services\AccountService;

class PageController extends Controller
{
    private $viewDirectory= 'web.pages.pages.';
    public function __construct(
        private AccountService $accountService,
        private PageService $pageService,
    ){}

    public function policy()
    {
        $page = $this->pageService->getItemById(3);

        $title = $page->currentDescription->title;

        return view($this->viewDirectory.'page',get_defined_vars());
    }
    public function conditions()
    {
        $page = $this->pageService->getItemById(4);

        $title = $page->currentDescription->title;

        return view($this->viewDirectory.'page',get_defined_vars());
    }
    public function terms()
    {
        $page = $this->pageService->getItemById(5);

        $title = $page->currentDescription->title;

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


}
