/* global window */
/* eslint-disable no-undef, no-console, no-alert, no-unused-vars */

import Alpine from 'alpinejs';
import collapse from '@alpinejs/collapse';
import persist from '@alpinejs/persist';
import focus from '@alpinejs/focus';

import { defineComponents } from '../shared/web-components/index.js';
import { registerRewardsPanelComponents } from '../shared/alpine-components/rewards-panel.js';

Alpine.plugin(collapse);
Alpine.plugin(persist);
Alpine.plugin(focus);

// Initialize Alpine.
window.Alpine = Alpine;

// Define custom elements.
defineComponents();

// Register rewards panel components
registerRewardsPanelComponents(Alpine);

// Start Alpine after defining components.
Alpine.start();
