<?php

namespace Planaday\Entities\DayPart;

use ArrayAccess;
use Countable;
use Planaday\Api\ApiException\InvalidResponseException;
use Planaday\Entities\DayPart\DTO\DayPart;
use Planaday\Entities\DayPart\Exception\DayPartNotFoundException;
use Traversable;

interface DayPartApi {

	/**
	 * @param int $courseId
	 * @param int $offset
	 * @param int $limit
	 *
	 * @return ArrayAccess<int|string, DayPart>&Traversable<int|string, DayPart>&Countable
	 * @throws InvalidResponseException
	 */
	public function getDayPartsCourse(int $courseId, int $offset = 0, int $limit = 100):ArrayAccess&Traversable&Countable;

	/**
	 * @throws DayPartNotFoundException
	 * @throws InvalidResponseException
	 */
	public function getDayPart(int $dayPartId):DayPart;

	/**
	 * @param ArrayAccess<int|string, int>&Traversable<int|string, int>&Countable $dayPartIds
	 *
	 * @return ArrayAccess<int|string, DayPart>&Traversable<int|string, DayPart>&Countable
	 * @throws DayPartNotFoundException
	 * @throws InvalidResponseException
	 */
	public function getDayParts(ArrayAccess&Traversable&Countable $dayPartIds):ArrayAccess&Traversable&Countable;
}