<template>
  <div>
    <p v-html="content"></p>
    <div class="mt-3 mb-5"></div>
    <div class="field is-grouped">
      <div class="control is-expanded">
        <button
          class="button is-light"
          @click="cancel()"
        >
          Đóng
        </button>
      </div>
      <div
        v-if="duration"
        class="control"
      >
        <CountDown
          :duration="duration"
          @close="cancel()"
        />
      </div>
    </div>
  </div>
</template>
<script setup>
const props = defineProps({
  content: String,
  duration: Number,
});

const emit = defineEmits(["close"]);

function cancel() {
  emit("close");
}
</script>
