33 lines
1.0 KiB
Vue
33 lines
1.0 KiB
Vue
<template>
|
|
<CreateMessageDeliveryOption :label :method v-model="model" />
|
|
|
|
<!-- Сообщение о недоступности -->
|
|
<p v-if="telegramNotice" class="text-red-500 mb-2">
|
|
Отправка в Telegram пока в разработке.<br />
|
|
Этот способ отправки сообщений можно будет выбрать позже.
|
|
</p>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { type QRCodeDocument } from '@/types/DBDocumentTypes'
|
|
import { type DeliveryOption, DELIVERY_METHOD_TELEGRAM } from '@/constants/deliveryOptions'
|
|
import { computed } from 'vue'
|
|
|
|
type DeliveryOptionTelegram = Extract<DeliveryOption, { method: typeof DELIVERY_METHOD_TELEGRAM }>
|
|
|
|
defineProps<{
|
|
label: DeliveryOptionTelegram['label']
|
|
method: DeliveryOptionTelegram['method']
|
|
}>()
|
|
|
|
defineEmits<{
|
|
(e: 'change', value: Event): void
|
|
}>()
|
|
|
|
const model = defineModel<null | QRCodeDocument['messageDeliveryMethod']>()
|
|
|
|
const telegramNotice = computed(() => {
|
|
return model.value! === DELIVERY_METHOD_TELEGRAM
|
|
})
|
|
</script>
|