(function ($) {
    'use strict';

    window.App = {
        /**
         * Initialise the object
         */
        init: function () {
            this.html = $('html');
            this.body = $('body');
            this.window = $(window);
            this.wp = window.wp;
            this.build();
            this.notify();
        },

        /**
         * Build or update the page
         */
        build: function () {
            this.example();
        },

        /**
         * Notify about Vite
         */
        notify: function () {
            if (this.wp.data && import.meta.env.DEV && import.meta.env.MODE === 'development') {
                this.wp.data.dispatch('core/notices').createNotice('error', "Vite is running in dev mode. This can cause problems in the block editor. Consider using 'make watch' instead.");
            }
        },

        /**
         * Example function
         */
        example: function () {
            // Example function
        }
    };
})(jQuery);

App.init();
