<script lang="ts">
export default {
  emits: ["closemodal"],
  props: ["content"],
  mounted() {
    (<HTMLElement>this.$refs.contentspan)
      .querySelectorAll(".closelink")
      .forEach((el) => {
        el.addEventListener("click", () => {
          this.$emit("closemodal");
        });
      });
  },
};
</script>
<template>
  <div class="modal">
    <div class="modal-content">
      <button class="closeBtn" @click="$emit('closemodal')">x</button>
			<div class="modal-inner-content">
					<slot></slot>
					<span v-html="content" ref="contentspan"></span>
			</div>
    </div>
  </div>
</template>
<style lang="css" scoped>
@import "../assets/modal";
</style>
