package cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support;

import java.util.*;

import cokr.xit.ens.modules.common.code.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.kkoalimtalk.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.kkomydoc.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.kkotalk.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.ktGibis.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.ktSigntalk.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.nvsigntalk.*;
import lombok.*;

// TODO: Sender에서 call
@RequiredArgsConstructor
public class AcceptDataMakerFactory extends AcceptDataFactory<AcceptData<?>> {
    private final IntgrnSendMast sendMast;
    private final List<IntgrnSendDetail> sendDetails;

    private final Boolean isReserveSend;

    @Override
    public AcceptData<?> get(PostSeCd postSeCd) {
        switch (postSeCd) {
            case kkoAlimtalk:
                return new AcceptDataByKkoAlimtalk(sendMast, sendDetails, isReserveSend);
            case kkoMydoc:
                return new AcceptDataByKkoMydoc(sendMast, sendDetails, isReserveSend);
            // FIXME: 카카오톡 추가
            case kkoTalk:
                return new AcceptDataByKkoTalk(sendMast, sendDetails, isReserveSend);
            case nvSigntalk:
                return new AcceptDataByNvSigntalk(sendMast, sendDetails, isReserveSend);
            case ktSigntalk:
                return new AcceptDataByKtSigntalk(sendMast, sendDetails, isReserveSend);
            case ktGibis:
                return new AcceptDataByKtGibis(sendMast, sendDetails, isReserveSend);
            default:
                throw new IllegalAccessError(postSeCd.getCode() + "에 대한 전자고지 접수 Class가 정의되지 않았습니다.");
        }
    }
}
