<template>
  <el-dialog
    class="card-preview-dialog"
    :visible.sync="modalIsShow"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    :modal="false"
    append-to-body
    fullscreen
  >
    <div slot="title"></div>
    <div slot="footer"></div>

    <card-rule-preview v-if="modalIsShow" :rule-id="ruleId"></card-rule-preview>
  </el-dialog>
</template>

<script>
import CardRulePreview from "../views/CardRulePreview.vue";

export default {
  name: "card-rule-preview-dialog",
  components: { CardRulePreview },
  props: {
    ruleId: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      modalIsShow: false,
    };
  },
  methods: {
    cancel() {
      this.modalIsShow = false;
    },
    open() {
      this.modalIsShow = true;
    },
  },
};
</script>
