<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{/web/layout/homeLayout}">
<th:block layout:fragment="layout_css">
    <link rel="stylesheet" href="/css/web/customer.css?v1.1">
<!--    <link rel="stylesheet" href="/css/web/customer_sub.css?v1.1">-->
    <!-- <link rel="stylesheet" href="/css/web/modal.css?v1.1"> -->
    <!-- <link rel="stylesheet" href="/css/web/grid.css?v1.1"> -->
</th:block>

<th:block layout:fragment="layout_top_script">
    <script src="/js/web/common_option.js"></script>
    <script src="/js/web/jquery.twbsPagination.js" type="text/javascript"></script>
    <script>
        let menuClass     = "[[${param.menuClass}]]"==""?"":"[[${param.menuClass}]]";

        let selectUseYn   = "[[${selectUseYn}]]"==""?"N":"[[${selectUseYn}]]";
        let insertUseYn   = "[[${insertUseYn}]]"==""?"N":"[[${insertUseYn}]]";
        let updateUseYn   = "[[${updateUseYn}]]"==""?"N":"[[${updateUseYn}]]";
        let deleteUseYn   = "[[${deleteUseYn}]]"==""?"N":"[[${deleteUseYn}]]";
        let downloadUseYn = "[[${downloadUseYn}]]"==""?"N":"[[${downloadUseYn}]]";

        let muUserId = "[[${param.muUserId}]]";
        /* 검색 관련 변수 */
        let userSearchKeywordParam = "[[${param.userSearchKeywordParam}]]";
        let userSort               = "[[${param.userSort}]]";
        let userDir                = "[[${param.userDir}]]";
        let userStart              = "[[${param.userStart}]]"==""?0:"[[${param.userStart}]]";
        let userLimit              = "[[${param.userLimit}]]"==""?500:"[[${param.userLimit}]]";

        let search_nationalityCode = "[[${param.nationalityCode}]]"??"";
        let search_nationality     = "[[${param.nationality}]]"??"";
        let search_userTypeCode    = "[[${param.userTypeCode}]]"??"";
        let search_userType        = "[[${param.userType}]]"??"";
        let search_membershipYn    = "[[${param.membershipYn}]]"??"";
        let search_appUseYn        = "[[${param.search_appUseYn}]]"??"";
    </script>
</th:block>
<th:block layout:fragment="layout_content">
    <div class="center_box">
        <p class="page_title">고객 목록</p>
        <p class="total">0명</p>

        <div class="filter_box user">
            <div class="form_box">
                <div class="select_box first dropdown">
                    <button class="label" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">고객구분</button>
                    <ul class="select_option_list dropdown-menu" id="userType">
                        <li class="option_list_item">전체</li>
<!--                        <li class="option_list_item" value="A"><img src="/image/web/fruit1.svg" alt="고객구분"></li>-->
<!--                        <li class="option_list_item" value="B"><img src="/image/web/fruit2.svg" alt="고객구분"></li>-->
<!--                        <li class="option_list_item" value="C"><img src="/image/web/fruit3.svg" alt="고객구분"></li>-->
                    </ul>
                </div>

                <div class="select_box dropdown">
                    <button class="label" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">국적</button>
                    <ul class="select_option_list dropdown-menu" id="nationality">
                        <li class="option_list_item">전체</li>
<!--                        <li class="option_list_item" value="KR">KR</li>-->
<!--                        <li class="option_list_item" value="JP">JP</li>-->
<!--                        <li class="option_list_item" value="CH">CH</li>-->
                    </ul>
                </div>

                <div class="select_box dropdown">
                    <button class="label" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">멤버십</button>
                    <ul class="select_option_list dropdown-menu" id="membershipYn">
                        <li class="option_list_item">전체</li>
                        <li class="option_list_item" value="Y">가입</li>
                        <li class="option_list_item" value="N">미가입</li>
                    </ul>
                </div>
                <div class="select_box dropdown">
                    <button class="label" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">앱 가입상태</button>
                    <ul class="select_option_list dropdown-menu" id="appUseYn">
                        <li class="option_list_item">전체</li>
                        <li class="option_list_item" value="Y">가입</li>
                        <li class="option_list_item" value="N">미가입</li>
                        <li class="option_list_item" value="D">탈퇴</li>
                    </ul>
                </div>

                <div class="search_list_box">
                    <div class="search_box">
                        <img src="/image/web/search_G.svg" alt="검색">
                        <input type="text" id="txt_userSearchKeyword" placeholder="고객명, 연락처, 생년월일">
                        <div class="search_list"></div><!-- 검색내역 나오는곳 -->
                    </div>
                    <button class="search_btn" id="searchBtn">조회</button>
                </div>
            </div>

            <div class="right_btn_box">
                <button class="member_btn" id="userBtn" style="transition: all 0.2s ease-in-out 0s;">고객 등록</button>
                <button class="download_btn" id="downLoadBtn">
                    <img src="/image/web/download.svg" alt="내려받기">
                    내려받기
                </button>
            </div>
        </div>

        <div id="userGrid" class="table_box ag-theme-balham"></div>

        <div class="page_box">
            <nav aria-label="Page navigation" class="navigation">
                <ul class="pagination" id="userPagination"></ul>
            </nav>
        </div>
    </div>
    <form id="excelForm" method="POST" target="_blank"></form>
</th:block>
<th:block layout:fragment="layout_popup">

</th:block>
<th:block layout:fragment="layout_script">
    <script src="/js/web/ag-grid-community-29.3.5.min.js"></script>
    <!-- <script src="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js"></script> -->
    <script src="/js/web/user/user.js"></script>
    <script src="/js/web/user/userSelectList.js"></script>
    <script src="/js/web/user/popup/userInfoInsertPop.js"></script>
    <!-- <script src="/js/web/user/popup/userIntroSelectListPop.js"></script> -->
</th:block>
</html>