package com.interplug.qcast.biz.pwrGnrSimulation;

import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimGuideResponse;
import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRequest;
import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/api/pwrGnrSimulation")
@RequiredArgsConstructor
@Tag(name = "PwrGnrSimulation", description = "발전시뮬레이션 관련 API")
public class PwrGnrSimController {

  private final PwrGnrSimService pwrGnrSimService;

  @Operation(description = "발전시뮬레이션 정보를 계산한다.")
  @GetMapping("/calculations")
  @ResponseStatus(HttpStatus.OK)
  public PwrGnrSimResponse selectPwrGnrSimulation(PwrGnrSimRequest pwrGnrSimRequest)
      throws Exception {
    return pwrGnrSimService.selectPwrGnrSimulation(pwrGnrSimRequest);
  }

  @Operation(description = "발전시뮬레이션 안내문구를 조회한다.")
  @GetMapping("/guideInfo")
  @ResponseStatus(HttpStatus.OK)
  public PwrGnrSimGuideResponse selectPwrGnrSimulationGuideInfo() throws Exception {
    return pwrGnrSimService.selectPwrGnrSimulationGuideInfo();
  }
}
