<?php

namespace Booktics;

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

/**
 * Activation class
 *
 * @package Booktics
 */
class Activate {
    /**
     * Activation hook
     *
     * @return  void
     */
    public static function handle(): void {
        Installer::run();
        self::set_default_options();
    }

    private static function set_default_options(): void {
        if ( function_exists( 'booktics_update_option' ) ) {
            booktics_update_option( 'appointment_status', 'pending' );
            booktics_update_option( 'appointment_statuses_for_blocked_slot', array( 'pending', 'approved' ) );
        }
    }
}
