<?php
/**
 * New Export - Select Type Page.
 *
 * @package PrimeLink
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
?>
<div class="wrap mt-primelink-wrap">
    <?php
    $header_actions     = '';
    $header_eyebrow     = __( 'New Export', 'primelink' );
    $header_title       = __( 'Choose Export Type', 'primelink' );
    $header_description = __( 'Select what you want to export from WooCommerce.', 'primelink' );

    include MT_PRIMELINK_PATH . 'templates/admin/partials/header.php';
    ?>

    <div class="mt_primelink-import-type-grid" style="margin-top:24px;">
        <?php
        $export_types = array(
            'products' => array(
                'title' => __( 'Products', 'primelink' ),
                'desc'  => __( 'Export WooCommerce products to CSV, XML, or XLSX files', 'primelink' ),
                'icon'  => 'dashicons-cart',
                'url'   => admin_url( 'admin.php?page=mt-primelink-new-export&export_type=products' ),
            ),
            'orders' => array(
                'title' => __( 'Orders', 'primelink' ),
                'desc'  => __( 'Export WooCommerce orders with customer and payment data', 'primelink' ),
                'icon'  => 'dashicons-clipboard',
                'url'   => admin_url( 'admin.php?page=mt-primelink-new-export&export_type=orders' ),
            ),
            'customers' => array(
                'title' => __( 'Customers', 'primelink' ),
                'desc'  => __( 'Export customer accounts with billing and shipping addresses', 'primelink' ),
                'icon'  => 'dashicons-groups',
                'url'   => admin_url( 'admin.php?page=mt-primelink-new-export&export_type=customers' ),
            ),
            'coupons' => array(
                'title' => __( 'Coupons', 'primelink' ),
                'desc'  => __( 'Export discount coupons with restrictions and usage limits', 'primelink' ),
                'icon'  => 'dashicons-tag',
                'url'   => admin_url( 'admin.php?page=mt-primelink-new-export&export_type=coupons' ),
            ),
            'categories' => array(
                'title' => __( 'Product Categories', 'primelink' ),
                'desc'  => __( 'Export product categories with hierarchy, descriptions, and thumbnails', 'primelink' ),
                'icon'  => 'dashicons-category',
                'url'   => admin_url( 'admin.php?page=mt-primelink-new-export&export_type=categories' ),
            ),
            'tags' => array(
                'title' => __( 'Product Tags', 'primelink' ),
                'desc'  => __( 'Export product tags with descriptions and thumbnails', 'primelink' ),
                'icon'  => 'dashicons-tag',
                'url'   => admin_url( 'admin.php?page=mt-primelink-new-export&export_type=tags' ),
            ),
            'attributes' => array(
                'title' => __( 'Product Attributes', 'primelink' ),
                'desc'  => __( 'Export WooCommerce product attributes and their terms', 'primelink' ),
                'icon'  => 'dashicons-tag',
                'url'   => admin_url( 'admin.php?page=mt-primelink-new-export&export_type=attributes' ),
            ),
            'variations' => array(
                'title' => __( 'Product Variations', 'primelink' ),
                'desc'  => __( 'Export product variations with prices, stock, images, and attributes', 'primelink' ),
                'icon'  => 'dashicons-admin-settings',
                'url'   => admin_url( 'admin.php?page=mt-primelink-new-export&export_type=variations' ),
            ),
            'reviews' => array(
                'title' => __( 'Product Reviews', 'primelink' ),
                'desc'  => __( 'Export product reviews with ratings, author info, and content', 'primelink' ),
                'icon'  => 'dashicons-star-filled',
                'url'   => admin_url( 'admin.php?page=mt-primelink-new-export&export_type=reviews' ),
            ),
            'downloads' => array(
                'title' => __( 'Product Downloads', 'primelink' ),
                'desc'  => __( 'Export downloadable files for products with download limits and expiration', 'primelink' ),
                'icon'  => 'dashicons-download',
                'url'   => admin_url( 'admin.php?page=mt-primelink-new-export&export_type=downloads' ),
            ),
        );

        foreach ( $export_types as $type => $data ) :
        ?>
            <a href="<?php echo esc_url( $data['url'] ); ?>" class="mt_primelink-import-type-card glass">
                <div class="mt_primelink-import-type-card__icon">
                    <span class="dashicons <?php echo esc_attr( $data['icon'] ); ?>"></span>
                </div>
                <div class="mt_primelink-import-type-card__content">
                    <h3 class="mt_primelink-import-type-card__title"><?php echo esc_html( $data['title'] ); ?></h3>
                    <p class="mt_primelink-import-type-card__desc"><?php echo esc_html( $data['desc'] ); ?></p>
                </div>
                <div class="mt_primelink-import-type-card__arrow">
                    <span class="dashicons dashicons-arrow-right-alt2"></span>
                </div>
            </a>
        <?php endforeach; ?>
    </div>

    <div style="margin-top:24px;text-align:center;">
        <a href="<?php echo esc_url( admin_url( 'admin.php?page=mt-primelink-manage-export' ) ); ?>" class="button">
            <?php esc_html_e( 'Back to Manage Exports', 'primelink' ); ?>
        </a>
    </div>
</div>






