<?php

namespace MovieEngine\Core;

if (! defined("ABSPATH")) {
    exit; // Exit if accessed directly
}

class Activator {

    public static function activate() {
        \MovieEngine\Core\Database::create_tables();
        \MovieEngine\Core\PageSetup::create_pages();
        flush_rewrite_rules();

        // Only redirect to setup on first time installation
        if (!get_option('movie_engine_setup_completed')) {
            set_transient('movie_engine_activation_redirect', true, 30);
        }
    }
}
