package com.unicorn.hgzero.ai.biz.service;

import com.unicorn.hgzero.ai.biz.gateway.LlmGateway;
import com.unicorn.hgzero.ai.biz.usecase.SectionSummaryUseCase;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 섹션 AI 요약 재생성 Service
 * LLM 기반 섹션 요약 생성
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class SectionSummaryService implements SectionSummaryUseCase {

    private final LlmGateway llmGateway;

    @Override
    public String regenerateSummary(String sectionId, String sectionContent, String meetingId) {
        log.info("Regenerating section summary: sectionId={}, meetingId={}", sectionId, meetingId);

        // LLM을 통한 요약 생성
        String meetingContext = meetingId != null ? "회의 ID: " + meetingId : "";
        return llmGateway.generateSummary(sectionContent, meetingContext);
    }
}
