<?php

/**
 * Plugin Name: Cliq Store Locator
 * Description: Responsive store locator with store management, location search, filters, and Leaflet or Google Maps.
 * Version: 1.0.0
 * Requires at least: 6.7
 * Requires PHP: 8.1
 * Author: CliqThemes
 * License: GPLv2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: cliq-store-locator
 * Domain Path: /languages
 */

declare(strict_types=1);

use CliqThemes\StoreLocator\Platform;
use CliqThemes\StoreLocator\Plugin;

if (! defined('ABSPATH')) {
    exit;
}

/*
 * Constants, the Composer autoloader and the hook registrations below may each
 * happen once per request. Stand down on a second include rather than warning
 * about the constants and registering every hook twice.
 */
if (defined('CLIQ_SL_FILE')) {
    return;
}

define('CLIQ_SL_FILE', __FILE__);
define('CLIQ_SL_VERSION', '1.0.0');
define('CLIQ_SL_PATH', plugin_dir_path(__FILE__));
define('CLIQ_SL_URL', plugin_dir_url(__FILE__));

require_once __DIR__ . '/vendor/autoload.php';

register_activation_hook(CLIQ_SL_FILE, [Platform::class, 'activate']);
register_deactivation_hook(CLIQ_SL_FILE, [Platform::class, 'deactivate']);

(new Platform())->boot();
(new Plugin(CLIQ_SL_FILE))->register();
