<template>
    <div id="Chapter1_1" class="content-wrap">
      <div class="title-box mb25 flex align-center mt40">
        <span class="title mr40">1. Hello WORLD</span>
        <span class="subtitle">my name is dd</span>
      </div>
      <div class="flex justify-between align-center">
        <div class="pre-btn" @click="goToPage('Chapter2_4')"><img src="../../../../resources/img/left.png" alt=""></div>
        <div class="content title-box">
          <p class="title mt25 title-bg">step2</p>
          <div class="flex align-center mb30">
          <p class="subtitle2 mr20">아래 지문을 보고 빈칸을 채워주세요.</p>
          <!-- <button><img src="../../../../resources/img/btn10_s.png" alt="">
          </button> -->
        </div>
  
          <div class="text-ct">
            <p class="title1 mb40" style="color: #464749;">the sun rises in the</p>
            <img src="../../../../resources/img/img65_37s.png" alt="">
          <div class="dropGroup flex align-center justify-center mt30">
            <span class="mr30">the sunrise the</span>
            <div class="flex" style="gap: 20px;">
              <button @click="showButton(1)"><img src="../../../../resources/img/img64_37s.png" alt=""><p v-if="showButton1">A</p></button>
              <button @click="showButton(2)" > <img src="../../../../resources/img/img64_37s.png" alt=""><p v-if="showButton2">A</p></button>
              <button @click="showButton(3)" ><img src="../../../../resources/img/img64_37s.png" alt=""><p v-if="showButton3">A</p></button>
              <button @click="showButton(4)" ><img src="../../../../resources/img/img64_37s.png" alt=""><p v-if="showButton4">A</p></button>
            </div>
             
          </div>
          <div class="dragGroup mt40">
            <div class="flex justify-center" style="gap: 20px;">
              <button><img src="../../../../resources/img/img63_37s.png" alt=""><p @click="handleDrag(1)">A</p></button>
              <button><img src="../../../../resources/img/img63_37s_1.png" alt=""><p @click="handleDrag(1)">A</p></button>
              <button><img src="../../../../resources/img/img63_37s.png" alt=""><p @click="handleDrag(1)">A</p></button>
              <button><img src="../../../../resources/img/img63_37s_2.png" alt=""><p @click="handleDrag(1)">A</p></button>
              <button><img src="../../../../resources/img/img63_37s_1.png" alt=""><p @click="handleDrag(1)">A</p></button>
              <button><img src="../../../../resources/img/img63_37s_2.png" alt=""><p @click="handleDrag(1)">A</p></button>
            </div>
            
          </div>
        </div>
        </div>
        <div class="next-btn" @click="goToPage('Chapter2_6')"><img src="../../../../resources/img/right.png" alt=""></div>
      </div>
    </div>
  </template>
  
  <script>
  export default {
    data() {
      return {
        showButton1: false,
      showButton2: false,
      showButton3: false,
      showButton4: false,
      }
    },
    methods: {
      goToPage(page) {
        this.$router.push({ name: page });
      },
      handleDrag(dragNumber) {
      // Drag 버튼 숨기기
      // 여기서는 상태 관리를 통해 버튼을 제어합니다.
      if (dragNumber === 1) {
        this.showButton1 = false;
      } else if (dragNumber === 2) {
        this.showButton2 = false;
      } else if (dragNumber === 3) {
        this.showButton3 = false;
      }
    },
    showButton(dropNumber) {
      // Drop 영역의 이미지 클릭 이벤트 핸들러 설정
      // 여기서는 상태 관리를 통해 버튼을 보이게 합니다.
      if (dropNumber === 1) {
        this.showButton1 = true;
      } else if (dropNumber === 2) {
        this.showButton2 = true;
      } else if (dropNumber === 3) {
        this.showButton3 = true;
      } else if (dropNumber === 4) {
        this.showButton4 = true;
      }
    },
    },
    watch: {
  
    },
    computed: {
  
    },
    components: {
    },
    mounted() {
      
    }
  }
  </script>
  <style scoped>
  .dropGroup button{position: relative;}
  .dropGroup button p{ font-size: 48px;}
.dragGroup button p{
  font-size: 48px;
  }
</style>