<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

require_once __DIR__ . '/class-silica.php';
require_once __DIR__ . '/admin-page.php';

if ( ! function_exists( 'silica_register_addon' ) ) {
    function silica_register_addon() {
        if ( ! did_action( 'elementor/loaded' ) ) {
            return;
        }
        
        add_action( 'elementor/init', [ Silica::class, 'init' ], 0 );
    }
}
add_action( 'plugins_loaded', 'silica_register_addon', 1 );

Silica_Admin_Page::init();