<?php
/**
 * Event automation editor entrypoint.
 *
 * @var array|null      $play
 * @var array|null      $recipe
 * @var \CartCue\Plugin $plugin
 * @package CartCue
 */
defined( 'ABSPATH' ) || exit;

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template scope.

$automation_type = 'event';

if ( 'unified' === apply_filters( 'cartcue_play_editor_view', 'unified' ) ) {
	include __DIR__ . '/play-edit-unified.php';
	return;
}

$editor_layout = 'accordion';

// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- UI state only.
if ( ! isset( $_GET['guided_step'] ) ) {
	$guided_step = ! empty( $recipe ) ? 'action' : 'trigger';
}

include __DIR__ . '/play-edit.php';
