<script setup lang="ts">
import type { NdmDeviceResultVO } from '@/apis';
import destr from 'destr';
import { NCard } from 'naive-ui';
import { computed, toRefs } from 'vue';

const props = defineProps<{
  ndmDevice: NdmDeviceResultVO;
}>();

const { ndmDevice } = toRefs(props);

const lastDiagInfo = computed(() => {
  return destr(ndmDevice.value.lastDiagInfo);
});
</script>

<template>
  <NCard hoverable size="small">
    <template #default>
      <pre>{{ { ...ndmDevice, lastDiagInfo } }}</pre>
    </template>
  </NCard>
</template>

<style scoped lang="scss"></style>
