<?php

namespace App\Http\Controllers\WebHook;

use App\Models\Room;
use App\Services\Interfaces\CategoryRepositoryInterface;
use App\Http\Controllers\Controller;
use App\Services\Response\ResponseService;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\View\View;

class CategoryController extends Controller
{
    private CategoryRepositoryInterface $categoryRepository ;


    public function __construct(
        CategoryRepositoryInterface $categoryRepository,
    )
    {
        $this->categoryRepository = $categoryRepository;
    }

    public function create(Request $request)
    {
        $this->categoryRepository->create($request);
        $response = [
            'status'=>Response::HTTP_OK,
            'message'=>'success',
            'data'=>[]
        ];
        return ResponseService::response($response);
    }
    public function update(Request $request,$id)
    {
        $this->categoryRepository->update($request,$id);
        $response = [
            'status'=>Response::HTTP_OK,
            'message'=>'success',
            'data'=>[]
        ];
        return ResponseService::response($response);
    }
    public function restore(Request $request,$id)
    {
        $this->categoryRepository->restore($request,$id);
        $response = [
            'status'=>Response::HTTP_OK,
            'message'=>'success',
            'data'=>[]
        ];
        return ResponseService::response($response);
    }
    public function destroy(Request $request,$id)
    {
        $this->categoryRepository->delete($request,$id);
        $response = [
            'status'=>Response::HTTP_OK,
            'message'=>'success',
            'data'=>[]
        ];
        return ResponseService::response($response);
    }


}
