<template>
  <div id="Chapter1_1" class="content-wrap">
    <div style="margin: 30px 0px 50px">
      <router-link to="/MyPlan.page">
        <div class="logo mb25">
          <img src="../../../../resources/img/logo2.png" alt="" />
        </div>
      </router-link>
    </div>
    <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_10')">
        <img src="../../../../resources/img/left.png" alt="" />
      </div>
      <div class="content title-box">
        <p class="title mt25 title-bg">step3 - 놀면서 배우는 영어</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">
          <div class="imgGroup flex align-start justify-center mt30">
            <img src="../../../../resources/img/img87_43s.png" alt="" />
            <div class="inputGroup">
              <p>{{ beforeQuestion }}</p>
              <p>__________</p>
              <p>{{ afterQuestion }}</p>
            </div>
          </div>
          <div class="pickGroup">
            <article
              class="flex justify-center"
              style="gap: 60px; bottom: 159px; left: 242px"
            >
              <div class="flex">
                <button @click="handleClick(1)">
                  <img src="../../../../resources/img/img136_71s.png" alt="" />
                  <p>1</p>
                </button>
                <p>{{ choice[0] }}</p>
              </div>
            </article>
            <article
              class="flex justify-center"
              style="gap: 60px; bottom: 159px; right: 559px"
            >
              <div class="flex">
                <button @click="handleClick(2)">
                  <img src="../../../../resources/img/img136_71s.png" alt="" />
                  <p>2</p>
                </button>
                <p>{{ choice[1] }}</p>
              </div>
            </article>
          </div>
        </div>
      </div>
      <div class="next-btn" @click="goToPage('Chapter2_13')">
        <img src="../../../../resources/img/right.png" alt="" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      beforeQuestion: "I",
      afterQuestion: "very hungry.",

      choice: ["am", "is"],
      answer: 1,
    };
  },
  methods: {
    goToPage(page) {
      this.$router.push({ name: page });
    },
    handleClick(buttonNumber) {
      if (buttonNumber === this.answer) {
        alert("정답입니다!");
      } else {
        alert("오답입니다!");
      }
    },
  },
  watch: {},
  computed: {},
  components: {},
  mounted() {},
};
</script>
<style scoped>
.imgGroup {
  margin-left: 183px;
  width: auto;
}
.pickGroup button {
  position: relative;
  margin-right: 30px;
}

.pickGroup button p {
  font-size: 34px;
  color: #c6c6c6;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.pickGroup article {
  position: absolute;
}
.pickGroup article img {
  object-fit: contain;
  width: -webkit-fill-available;
}
.pickGroup article > div > p {
  font-size: 64px;
}

.inputGroup {
  display: flex;
  align-items: center;
  gap: 30px;
}

.inputGroup p {
  font-size: 28px;
}
</style>
