import { Plugin } from '@nuxt/types'
import DataDeleter from '~/services/data/dataDeleter'

const dataDeleterPlugin: Plugin = (ctx) => {
  const dataDeleter = new DataDeleter()
  dataDeleter.initCtx(ctx)

  // Déclare un nouvel accesseur de service via le context Nuxt
  ctx.$dataDeleter = dataDeleter
}

export default dataDeleterPlugin
