<!DOCTYPE html>
<html lang="ko"
	xmlns:th="http://www.thymeleaf.org">
<!--
 *******************************************************************************
 * @source  : CardPrmtFormWeb.html
 * @desc    : 카드 혜택안내 팝업
 *============================================================================
 * STYLE24
 * Copyright(C) 2020 TSIT, All rights reserved.
 *============================================================================
 * VER  DATE         AUTHOR      DESCRIPTION
 * ===  ===========  ==========  =============================================
 * 1.0  2021.03.02   eskim        최초 작성
 *******************************************************************************
 -->
<div class="modal-dialog" role="document">
	<div class="modal-content">
		<div class="modal-header">
			<h5 class="modal-title" id="exampleFullLabel">카드혜택</h5>
		</div>
		<div class="modal-body" th:if="${cardInfoList != null and !cardInfoList.empty}">
			<div class="pop_cont">
				<th:block  th:with="selection=${cardInfoList.?[prmtGb == 'A']}">
				<div class="benefit_blk" th:if="${selection.size() > 0}">
					<h6>할인혜택</h6>
					<div class="tbl type1" >
						<table >
							<colgroup  >
								<col width="85"  >
								<col width="*"  >
							</colgroup>
							<tbody >
								<tr th:each="cardInfo, status : ${cardInfoList}" th:if="${cardInfo.prmtGb == 'A' }">
									<th th:text="${cardInfo.prmtTargetNm}">KB국민카드</th>
									<td>
										<div class="info_card">
											<th:block th:if="${cardInfo.dcGb == '3'}">
											<p th:text="${cardInfo.prmtNm}">5% 즉시할인</p>
											<p th:text="${cardInfo.note}">할인</p>
											</th:block>
											<th:block th:unless="${cardInfo.dcGb == '3'}">
											<p th:text="${#numbers.formatInteger(cardInfo.dcVal, 0,'COMMA')+ cardInfo.dcWayNm + ' ' + cardInfo.prmtGbNm}">5% 즉시할인</p>
											<p>
											<th:block th:text="${#numbers.formatInteger(cardInfo.minPayAmt, 0,'COMMA')  + '원 이상 구매 시'}"></th:block><br/>
											<th:block th:text="${'최대 ' + #numbers.formatInteger(cardInfo.maxDcAmt, 0,'COMMA') + '원 할인 '}"></th:block>
											</p>
											</th:block>
											<th:block th:if="${not #strings.isEmpty(cardInfo.linkUrl)}"><a th:href="${cardInfo.linkUrl}" target="_blank" class="link" >자세히보기</a></th:block>
										</div>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<th:block th:with="selection=${cardInfoList.?[prmtGb == 'B']}">
				<div class="benefit_blk" th:if="${selection.size() > 0}">
					<h6>무이자 할부</h6>
					<div class="tbl type1">
						<table>
							<colgroup>
								<col width="85">
								<col width="*">
							</colgroup>
							<tbody>
								<tr th:each="cardInfo, status : ${cardInfoList}" th:if="${cardInfo.prmtGb == 'B' }">
									<th th:text="${cardInfo.prmtTargetNm}">KB국민카드</th>
									<td>
										<div class="info_card">
											<p th:text="${cardInfo.minNoItrt + '~' + cardInfo.maxNoItrt + '개월 무이자'}">2~6개월 무이자</p>
											<p th:text="${#numbers.formatInteger(cardInfo.minPayAmt, 0,'COMMA') + '원 이상 구매 시'}">5만원 이상 구매 시</p>
										</div>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				</th:block>
				<th:block th:each="cardInfo, status : ${cardInfoList}" >
<!--				<div class="benefit_blk"  th:if="${cardInfo.prmtGb == 'B' and not #strings.isEmpty(cardInfo.note) and cardInfo.rownum ==  1}">-->
				<div class="benefit_blk"  th:if="${cardInfo.prmtGb == 'B' and cardInfo.note != '<p><br></p>' and cardInfo.rownum ==  1}">
					<h6>부분 무이자 할부</h6>
					<th:block th:utext="${#strings.unescapeJava(#strings.escapeJava(cardInfo.note))}"></th:block>
				</div>
				</th:block>
				<div class="benefit_blk" >
					<div class="info_txt">
						<ul>
							<li>무이자할부는 행사기간 동안 실 결제금액 기준으로 가능</li>
							<li>법인, 체크, 기프트 카드는 부분 무이자 할부 제외</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>	
<a href="javascript:void(0);" rel="modal:close" onclick="cfCloseLayer('layer_card_benefit')" class="close-modal">Close</a>
</html>