/**
 * WordPress dependencies
 */
import { render } from '@wordpress/element';
import AdminPage from './admin-page';

/**
 * Styles
 */
import './admin-page.scss';

/**
 * Initialize the admin page when DOM is ready.
 */
document.addEventListener('DOMContentLoaded', () => {
	const { dom_element_id } = window.redicl || {};

	if (dom_element_id) {
		const container = document.getElementById(dom_element_id);
		if (container) {
			render(<AdminPage />, container);
		}
	}
});
