<?php
/**
 * Delete folder modal partial.
 *
 * @package NNAXFUF_Plugin
 */
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
?>
<!-- DELETE FOLDER MODAL -->
<div id="nnaxfuf-delete-folder-modal" class="nnaxfuf-modal uk-flex-top" uk-modal>
    <div class="uk-modal-dialog uk-modal-body uk-margin-auto-vertical uk-width-1-1 uk-width-1-2@m">

        <button class="uk-modal-close-default" type="button" uk-close></button>

        <h3 class="uk-modal-title"><?php esc_html_e( 'Delete Folder', 'nnax-frontend-user-files' ); ?></h3>

        <p class="uk-margin-small">
            <?php esc_html_e( 'Folder:', 'nnax-frontend-user-files' ); ?> <strong id="nnaxfuf_delete_folder_title">-</strong>
        </p>

        <p class="uk-text-muted uk-margin-small">
            <?php esc_html_e( 'Choose what should happen to files and subfolders.', 'nnax-frontend-user-files' ); ?>
        </p>

        <div class="uk-alert-warning" uk-alert>
            <p class="uk-margin-remove">
                <strong><?php esc_html_e( 'Note:', 'nnax-frontend-user-files' ); ?></strong>
                <?php esc_html_e( '"Delete folder including contents" removes everything (moves to trash if enabled).', 'nnax-frontend-user-files' ); ?>
            </p>
        </div>

        <div class="uk-grid-small uk-margin-top" uk-grid>
            <div class="uk-width-1-1 uk-width-1-2@s">
                <!-- Variante A -->
                <form method="post" action="<?php echo esc_url( $frontend_form_action_url ); ?>" class="uk-margin-remove">
                    <?php wp_nonce_field('nnaxfuf_delete_folder', 'nnaxfuf_nonce'); ?>
                    <input type="hidden" name="action" value="nnaxfuf_delete_folder">
                    <input type="hidden" name="nnaxfuf_folder_id" id="nnaxfuf_delete_folder_id_move" value="">
                    <input type="hidden" name="nnaxfuf_redirect_to" value="<?php echo esc_url( $frontend_redirect_url ); ?>">
                    <input type="hidden" name="nnaxfuf_notice_key" value="<?php echo esc_attr( $frontend_notice_key ); ?>">
                    <button type="submit" class="uk-button uk-button-default uk-width-1-1">
                        <?php esc_html_e( 'Move to root', 'nnax-frontend-user-files' ); ?>
                    </button>
                </form>
            </div>

            <div class="uk-width-1-1 uk-width-1-2@s">
                <!-- Variante B -->
                <form method="post" action="<?php echo esc_url( $frontend_form_action_url ); ?>" class="uk-margin-remove">
                    <?php wp_nonce_field('nnaxfuf_delete_folder_recursive', 'nnaxfuf_nonce'); ?>
                    <input type="hidden" name="action" value="nnaxfuf_delete_folder_recursive">
                    <input type="hidden" name="nnaxfuf_folder_id" id="nnaxfuf_delete_folder_id_recursive" value="">
                    <input type="hidden" name="nnaxfuf_redirect_to" value="<?php echo esc_url( $frontend_redirect_url ); ?>">
                    <input type="hidden" name="nnaxfuf_notice_key" value="<?php echo esc_attr( $frontend_notice_key ); ?>">
                    <button type="submit" class="uk-button uk-button-danger uk-width-1-1">
                        <?php esc_html_e( 'Delete including contents', 'nnax-frontend-user-files' ); ?>
                    </button>
                </form>
            </div>
        </div>

        <div class="uk-margin-top uk-text-right">
            <button class="uk-button uk-button-default uk-modal-close" type="button">
                <?php esc_html_e( 'Cancel', 'nnax-frontend-user-files' ); ?>
            </button>
        </div>

    </div>
</div>
