<?php

namespace App\Http\Controllers\WebHook;

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

class ProductController extends Controller
{
    private ProductRepositoryInterface $productRepository ;


    public function __construct(
        ProductRepositoryInterface $productRepository,
    )
    {
        $this->productRepository = $productRepository;
    }

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


}
