<script setup>
import MdrAlert from "../MdrAlert.vue";
import { baseAlert } from "./compose.js";
import { InformationCircleIcon } from "@heroicons/vue/24/solid";

const { visible, toggle } = baseAlert();

defineProps({
  message: {
    type: String,
    default: "",
  },
  title: {
    type: String,
    default: "İşlem Başarısız",
  },
});

defineExpose({
  toggle,
});
</script>
<template>
  <MdrAlert
    v-model="visible"
    :title="title"
    class="bg-blue-50 border-blue-600 text-blue-600 w-80 sm:w-96"
    animate
  >
    <template #icon>
      <InformationCircleIcon class="size-6 text-blue-600" />
    </template>
    <template v-if="message">
      {{ message }}
    </template>
  </MdrAlert>
</template>
