<template>
  <div class="demo-notification-icon">
    <ui-button @click="handleClick('info')">
      Infomation
    </ui-button>
    <ui-button @click="handleClick('success')">
      Success
    </ui-button>
    <ui-button @click="handleClick('warning')">
      Warning
    </ui-button>
    <ui-button @click="handleClick('error')">
      Error
    </ui-button>
    <ui-button @click="handleCustomIcon">
      Custom
    </ui-button>
  </div>
</template>

<script>
import { Button } from "amumu-ui"
import { notification } from "amumu-ui/src/factory"

export default {
  components: {
    "ui-button": Button,
  },
  data() {
    return {
      visible: false,
    }
  },
  methods: {
    handleClick(type) {
      notification[type]({
        title: "通知",
        message: "通知内容。",
      })
    },
    handleCustomIcon() {
      notification({
        title: "通知",
        message: "通知内容。",
        iconName: "setup_assistant_guide",
      })
    },
  },
}
</script>

<style lang="scss">
.demo-notification-icon {
  .mm-button {
    margin-right: 1rem;
  }
}
</style>
