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

const { visible, toggle } = baseAlert();

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

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