<template>

  <div>
    <!--	s: 팝업	-->
    <div class="dimmed modal17" @click="searchIdFailModalClose();"></div>
    <div class="popup-wrap modal17">
      <!-- 시스템관리 팝업 -->

      <!-- ID 조회 -->
      <div class="popup modal17">
        <div class="pop-head">
          <h3 class="pop-tit">ID 조회</h3>
        </div>
        <div class="pop-cont">
          <p>입력하신 마당ID를 조회할 수 없습니다.</p>
        </div>
        <div class="popup-btn1">
          <button class="btn-pcolor" @click="searchIdFailModalClose();">확인</button>
        </div>
      </div>
    </div>

    <div class="dimmed modal18" @click="searchIdModalCancelClose();"></div>
    <div class="popup-wrap modal18">
      <div class="popup modal18">
        <div class="pop-head">
          <h3 class="pop-tit">관리자 ID 조회</h3>
        </div>
        <div class="pop-cont">
          <p>선택하신 정보가 아래와 같습니다.</p>
          <p>관리자 정보를 입력하시겠습니까?</p>
        </div>
        <ul class="pop-cont-detail">
          <li>마당ID : {{ madangId }}</li>
          <li>이름 : {{ name }}</li>
          <li>휴대폰번호 : {{ mdn }}</li>
          <li>이메일 : {{ email }}</li>
        </ul>
        <div class="popup-btn2">
          <button class="btn-pcolor" @click="searchIdModalOkClose();">확인</button>
          <button class="btn-default" @click="searchIdModalCancelClose();">취소</button>
        </div>
      </div>
      <!-- 시스템관리 팝업 끝-->
    </div>
  </div>

</template>

<script>

export default {
  data() {
    return {
      authType: [],
      madangId: '',
      adminPw: '',
      name: '',
      mdn: '',
      email: '',
      auth: '',
      code: '',
      stat: '',
      row:{},
      title:'',
      msg1: '',
      msg2: '',
      msg3: '',
      msg4: '',
      targetFocus: '',
    }
  },
  methods: {
    // 모달 띄우기(성공모달)
    searchIdModalOpen(target) {
      var dimmed = document.getElementsByClassName('dimmed modal18');
      var wrap = document.getElementsByClassName('popup-wrap modal18');
      var obj = document.getElementsByClassName(target);
      dimmed[0].style.display = 'block';
      wrap[0].style.display = 'block';
      obj[0].style.display = 'block';
    },
    // 성공 모달 끄기(ok)
    searchIdModalOkClose() {
      var dimmed = document.getElementsByClassName('modal18');
      for (var i = 0; i < dimmed.length; i++) {
        dimmed[i].style.display = 'none';
      }
    },
    // 성공 모달 끄기(cancel)
    searchIdModalCancelClose() {
      var dimmed = document.getElementsByClassName('modal18');
      for (var i = 0; i < dimmed.length; i++) {
        dimmed[i].style.display = 'none';
      }
      this.$parent.resetRegPop();
    },
    // 모달 띄우기(실패모달)
    searchIdFailModalOpen(target) {
      var dimmed = document.getElementsByClassName('dimmed modal17');
      var wrap = document.getElementsByClassName('popup-wrap modal17');
      var obj = document.getElementsByClassName(target);
      dimmed[0].style.display = 'block';
      wrap[0].style.display = 'block';
      obj[0].style.display = 'block';
    },
    // 실패 모달 끄기
    searchIdFailModalClose() {
      var dimmed = document.getElementsByClassName('modal17');
      for (var i = 0; i < dimmed.length; i++) {
        dimmed[i].style.display = 'none';
      }
      this.$parent.resetRegPop();
    },
    searchIdPop(params) {
      var userName = params.userNm;
      this.madangId = params.madangId;
      this.name = params.userNm;
      this.email = params.email;
      this.mdn = params.mdn;
      this.code = params.code
      var dimmed = document.getElementsByClassName('modal18');
      for (var i = 0; i < dimmed.length; i++) {
        dimmed[i].style.display = 'block';
      }
    },
    searchIdFailPop() {
      var dimmed = document.getElementsByClassName('modal17');
      for (var i = 0; i < dimmed.length; i++) {
        dimmed[i].style.display = 'block';
      }
    },    
  }
}
</script>