package com.ikon.projectmanagement.api;

import java.util.List;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import com.ikon.projectmanagement.dto.response.DashboardWidgetsResponseDto;
import com.ikon.projectmanagement.dto.response.StatusWiseProjectResponseData;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;

@Tag(name = "Dashboard", description = "APIs for managing dashboard")
@RequestMapping("/api/v1/dashboard")
public interface DashboardApi {
        @Operation(summary = "Get dashboard widgets data", description = "Retrieves the data for the dashboard widgets.", responses = {
                        @ApiResponse(responseCode = "200", description = "Widgets data retrieved successfully"),
                        @ApiResponse(responseCode = "401", description = "Unauthorized"),
                        @ApiResponse(responseCode = "500", description = "Internal server error")
        })
        @GetMapping("/widgets")
        ResponseEntity<DashboardWidgetsResponseDto> getWidgetsData(
                        @RequestHeader("Authorization") String accessToken);

        @Operation(summary = "Get status-wise project data", description = "Retrieves the project data based on their status.", responses = {
                        @ApiResponse(responseCode = "200", description = "Project data retrieved successfully"),
                        @ApiResponse(responseCode = "401", description = "Unauthorized"),
                        @ApiResponse(responseCode = "500", description = "Internal server error")
        })
        @GetMapping("/status-wise-projects")
        ResponseEntity<List<StatusWiseProjectResponseData>> getStatusWiseProjectData(
                        @RequestHeader("Authorization") String accessToken);
}
