<template>
  <v-app :full-height="false">
    <v-snackbar
      v-if="color === 'point'"
      style="padding-top: 40vh;"
      timeout="-1"
      location="top"
      color="#f9eddce3"
      :variant="variant || 'flat'"
      v-model="snackbar"
    >
    <div class="d-flex align-end">
      <span style="color: darkorange; font-size: 48px;" class="mdi mdi-database-check-outline ml-5 mr-2"></span>
      <div style="color: darkorange;" class="mb-3">{{message}}</div>
    </div>
    <template v-slot:actions>
          <span style="color: darkorange; font-size: 22px;" class="mdi mdi-close-circle-outline mr-5" @click="snackbar = false"></span>
        </template>
    </v-snackbar>
    <v-snackbar
      v-else
      timeout="-1"
      location="top"
      :variant="variant || 'flat'"
      :color="color"
      v-model="snackbar"
    >{{message}}
    <template v-slot:actions>
          <v-btn
            color="white"
            variant="text"
            @click="snackbar = false"
          >
            关闭
          </v-btn>
        </template>
    </v-snackbar>
  </v-app>
</template>

<script setup>
import { ref } from 'vue'
defineProps({
  variant: String,
  color: String,
  message: String
})
defineOptions({ name: 'snackbar-message' })

const snackbar = ref(true)

</script>
<style scoped>

</style>