<script setup>

// Use this in any component after injecting from the Index.vue provided Dialog
//
// const subscriptionRequiredDialog = inject('subscriptionRequiredDialog');
// subscriptionRequiredDialog.value.open();

import { useTemplateRef } from 'vue';
import { Dialog, Button } from 'pankow';

const dialog = useTemplateRef('dialog');

defineExpose({
  async open() {
    dialog.value.open();
  }
});

</script>

<template>
  <Dialog ref="dialog" title="Subscription required" :show-x="true">
    <p>To use this feature a Cloudron subscription needs to be set up</p>
    <Button href="https://console.cloudron.io" target="_blank">Set up</Button>
  </Dialog>
</template>
