<?php
namespace NeoDrawFull\NeoMotion; if (!defined("ABSPATH")) { die("neoWP direct access not allowed"); }





\NeoDrawFull\NeoGlobal\add_action_hook("wp_enqueue_scripts", function () { \NeoDrawFull\NeoGlobal\enqueue_js("neo-motion--frontend-reload-stopmotion-image-in-viewport.frontend.js"); });
\NeoDrawFull\NeoGlobal\frontend_image_hook_register_callback(function ($get_attr, $set_attr, $image_file_path) {
    if (!\NeoDrawFull\NeoGlobal\is_neodraw_image_path($image_file_path)) { return; }
    $neodraw_metadata = \NeoDrawFull\NeoGlobal\get_image_metadata_by_path($image_file_path); if ($neodraw_metadata === false) { return; }
    $set_attr("src", \NeoDrawFull\NeoGlobal\add_or_update_query_params($get_attr("src"), ["neo-motion" => ($neodraw_metadata["isMotion"] ?? false) ? "true" : "false"]));
});
\NeoDrawFull\NeoGlobal\add_action_hook("neo_init", function () {
    $settings_render_callback = function () {
        ?><neo-setting-neo-draw-full>
            <div slot="left">
                <h3><?php \NeoDrawFull\NeoGlobal\echo_neo__("New stop-motion graphic", "Neue Stop-Motion Grafik") ?></h3>
                <p><?php \NeoDrawFull\NeoGlobal\echo_neo__("Start with a prepared neoMotion template to create a stop-motion animation yourself. Preview in the editor via the play button at the top right.", "Starte mit einer vorbereiteten neoMotion-Vorlage, um eine Stop-Motion-Animation selbst zu erstellen. Vorschau im Editor über den Play-Button oben rechts.") ?></p>
            </div>
            <div slot="right">
                <neo-button-neo-draw-full class="neo-motion--create-starter-button"><?php \NeoDrawFull\NeoGlobal\echo_neo__("Create new", "Neu erstellen"); ?></neo-button-neo-draw-full>
            </div>
        </neo-setting-neo-draw-full>
        <?php
    };
    \NeoDrawFull\NeoGlobal\call_interface_func_implemented('\NeoDrawFull\NeoSettings\interface_add_neo_setting_20260326')("neo-motion", $settings_render_callback);
    $assets_callback = function () { \NeoDrawFull\NeoGlobal\call_interface_func_implemented('\NeoDrawFull\NeoDraw\interface_draw_editor_dialog_init_20250302')(); \NeoDrawFull\NeoGlobal\enqueue_js_variable_backend("neoMotionStarterImageUrl", "data:image/svg+xml;base64," . base64_encode(\NeoDrawFull\NeoGlobal\fs_file_get_contents(\NeoDrawFull\NeoGlobal\plugin_path() . "/img/neo-motion--starter-image.svg"))); \NeoDrawFull\NeoGlobal\enqueue_js_variable_backend("neoMotionMediaLibraryUrl", admin_url("upload.php")); \NeoDrawFull\NeoGlobal\enqueue_js("neo-motion--settings.js"); };
    \NeoDrawFull\NeoGlobal\call_interface_func_implemented('\NeoDrawFull\NeoSettings\interface_add_neo_settings_asset_loading_callback_20250918')($assets_callback);
    [$neo_motion_settings_section_url, $interface_ok] = \NeoDrawFull\NeoGlobal\call_interface_func_implemented('\NeoDrawFull\NeoSettings\interface_get_neo_settings_section_url_20260613')("neo-motion"); if (!$interface_ok) { return; }
    \NeoDrawFull\NeoGlobal\call_interface_func_implemented('\NeoDrawFull\NeoPlayground\interface_run_plugin_demo_redirect_20260604')("neo-motion", $neo_motion_settings_section_url);
});
function interface_get_neo_draw_editor_head_html_20260615() {
    return \NeoDrawFull\NeoGlobal\get_code_for_js_variables("backend");
}
function interface_get_neo_draw_editor_web_component_importer_url_20260615() {
    return \NeoDrawFull\NeoGlobal\plugin_url() . "/_global-web-component-importer.js";
}
