package cz.muni.fi.pa165.soccermanager.service;

import cz.muni.fi.pa165.soccermanager.dto.PlayerDto;
import cz.muni.fi.pa165.soccermanager.dto.request.CreatePlayerRequest;
import cz.muni.fi.pa165.soccermanager.dto.request.UpdatePlayerDto;
import java.util.List;
import java.util.Optional;
import org.springframework.data.domain.Page;

public interface PlayerService {
    void update(Long player, UpdatePlayerDto playerDTO);

    void remove(Long player);

    Optional<PlayerDto> findPlayerById(Long playerId);

    Long savePlayer(CreatePlayerRequest request);

    Page<PlayerDto> getAllPlayers(int offset, int pageSize, String field);

    List<PlayerDto> findPlayersByTeam(Long team);

    List<PlayerDto> findFreeAgents();
}
