export default defineNuxtRouteMiddleware((to) => {
  const { canWriteApplicationForms } = usePermissions()

  if (to.path === '/create' && !canWriteApplicationForms.value) {
    return navigateTo('/', { replace: true })
  }
})

