package com.ikon.projectmanagement.api;

import com.ikon.projectmanagement.dto.request.EmployeeRequestDto;
import com.ikon.projectmanagement.dto.response.EmployeeResponseDto;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;

@Tag(name = "Employee APIs", description = "APIs for managing local employees")
@RequestMapping("/api/v1/employees")
public interface EmployeeApi {

    @Operation(summary = "Get all employees")
    @GetMapping
    ResponseEntity<List<EmployeeResponseDto>> getAllEmployees();

    @Operation(summary = "Get employee by ID")
    @GetMapping("/{id}")
    ResponseEntity<EmployeeResponseDto> getEmployeeById(@PathVariable String id);

    @Operation(summary = "Create a new employee")
    @PostMapping
    @ResponseStatus(HttpStatus.CREATED)
    ResponseEntity<EmployeeResponseDto> createEmployee(@RequestBody EmployeeRequestDto dto);

    @Operation(summary = "Update an existing employee")
    @PutMapping("/{id}")
    ResponseEntity<EmployeeResponseDto> updateEmployee(@PathVariable String id, @RequestBody EmployeeRequestDto dto);

    @Operation(summary = "Delete an employee")
    @DeleteMapping("/{id}")
    @ResponseStatus(HttpStatus.NO_CONTENT)
    ResponseEntity<Void> deleteEmployee(@PathVariable String id);
}
