import { Cloudinary } from '@cloudinary/url-gen'

export default defineNuxtPlugin(() => {
  const config = useRuntimeConfig()
  
  const cloudinary = new Cloudinary({
    cloud: {
      cloudName: config.public.cloudinaryCloudName
    }
  })

  return {
    provide: {
      cloudinary
    }
  }
})