<?php
/**
 * Create folder modal partial.
 *
 * @package NNAXFUF_Plugin
 */
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
?>
<!-- CREATE FOLDER MODAL -->
<div id="nnaxfuf-create-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-3@m">

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

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

        <form method="post" action="<?php echo esc_url( $frontend_form_action_url ); ?>" class="uk-margin-remove">
            <?php wp_nonce_field('nnaxfuf_create_folder', 'nnaxfuf_nonce'); ?>
            <input type="hidden" name="action" value="nnaxfuf_create_folder">
            <input type="hidden" name="nnaxfuf_folder_id" value="<?php echo isset($current_folder_id) ? (int) $current_folder_id : 0; ?>">
            <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 ); ?>">

            <div class="uk-margin">
                <label class="uk-form-label" for="nnaxfuf_folder_title_modal"><?php esc_html_e( 'Folder name', 'nnax-frontend-user-files' ); ?></label>
                <div class="uk-form-controls">
                    <input
                        type="text"
                        class="uk-input"
                        name="nnaxfuf_folder_title"
                        id="nnaxfuf_folder_title_modal"
                        placeholder="<?php echo esc_attr__( 'e.g. Invoices 2026', 'nnax-frontend-user-files' ); ?>"
                        required
                        maxlength="120">
                </div>
                <small class="uk-text-muted"><?php esc_html_e( 'The folder will be created in the current folder.', 'nnax-frontend-user-files' ); ?></small>
            </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>
                <button class="uk-button uk-button-primary" type="submit">
                    <?php esc_html_e( 'Create', 'nnax-frontend-user-files' ); ?>
                </button>
            </div>
        </form>

    </div>
</div>
