<template>
  <ych-modal
    :fullscreen="true"
    :bodyStyle="bodyStyle"
    :title="title"
    :visible="visible"
    :footer="null"
    @cancel="handleCancel">
    <report-widget-redirect-card :widget-code="widgetCode"></report-widget-redirect-card>
  </ych-modal>
</template>

<script>

  import ReportWidgetRedirectCard from './ReportWidgetRedirectCard'
  import locleUtil from "../../utils/LocleUtil";

  export default {
    name: 'ReportWidgetRedirectModal',
    components: {
      ReportWidgetRedirectCard
    },
    data () {
      return {
        title: locleUtil.getLocale('m.common.button.preview'),
        visible: false,
        widgetCode: null,
        bodyStyle: {
          padding: '10px',
          margin: '',
          backgroundColor: '#ececec'
        },
      }
    },
    methods: {
      handleCancel () {
        this.visible = false
      }
    }
  }
</script>
