<?php

namespace App\Services;

use App\Repositories\AreaGroupTypeRepository;

class AreaGroupTypeService
{
    protected AreaGroupTypeRepository $areaGroupTypeRepository;

    public function __construct() {
        $this->areaGroupTypeRepository = new AreaGroupTypeRepository();
    }

    public function findByAreaAndGroupType($area_id, $group_type_id)
    {
        return $this->areaGroupTypeRepository->findByAreaAndGroupType($area_id, $group_type_id);
    }

    public function exists($area_id, $group_type_id)
    {
        return $this->areaGroupTypeRepository->exists($area_id, $group_type_id);
    }

    public function assign($area_id, $group_type_id)
    {
        return $this->areaGroupTypeRepository->assign($area_id, $group_type_id);
    }

    public function hasGroups($area_group_type_id)
    {
        return $this->areaGroupTypeRepository->hasGroups($area_group_type_id);
    }
}