/home/bdqbpbxa/api-uniferx.goodface.com.ua/vendor/nova-kit/nova-packages-tool/resources/js/tool.js
window.LaravelNova = require('laravel-nova')

Nova.booting(() => {
  let currentTheme = null

  new MutationObserver(() => {
    const element = document.documentElement.classList
    const theme = element.contains('dark') ? 'dark' : 'light'

    if (theme !== currentTheme) {
      Nova.$emit('nova-theme-switched', {
        theme,
        element
      })

      currentTheme = theme
    }
  }).observe(document.documentElement, {
    attributes: true,
    attributeOldValue: true,
    attributeFilter: ['class'],
  })
})