<template>
  <kk-button text @click="open">Click to open the Message Box</kk-button>
</template>

<script lang="ts" setup>
import { KkButton, KkMessage, KkMessageBox } from 'kankan-components'
const open = () => {
  KkMessageBox.confirm(
    'proxy will permanently delete the file. Continue?',
    'Warning',
    {
      confirmButtonText: 'OK',
      cancelButtonText: 'Cancel',
      type: 'warning',
    }
  )
    .then(() => {
      KkMessage({
        type: 'success',
        message: 'Delete completed',
      })
    })
    .catch(() => {
      KkMessage({
        type: 'info',
        message: 'Delete canceled',
      })
    })
}
</script>
