<?php
/** Kadence Forms ability loader and registration. */

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

require_once __DIR__ . '/kadence-form-settings-common.php';
require_once __DIR__ . '/kadence-form-settings-read.php';
require_once __DIR__ . '/kadence-form-settings-write.php';

function wpagent_register_kadence_form_settings_abilities(): void {
	if ( ! wpagent_companion_gate_open() ) {
		return;
	}
	wpagent_companion_register_hardened_ability( 'wp-agent/list-kadence-forms', wpagent_ability_list_kadence_forms() );
	wpagent_companion_register_hardened_ability( 'wp-agent/get-kadence-form-settings', wpagent_ability_get_kadence_form_settings() );
	wpagent_companion_register_hardened_ability( 'wp-agent/update-kadence-form-settings', wpagent_ability_update_kadence_form_settings() );
}
add_action( 'wp_abilities_api_init', 'wpagent_register_kadence_form_settings_abilities' );
