<?php
if ( ! defined( 'ABSPATH' ) ) { exit; }
?>
<div id="knsdd-edit-group-modal" class="knsdd-modal" style="display:none;">
    <div class="knsdd-modal-content">
        <span class="knsdd-modal-close">&times;</span>
        <h3><?php esc_html_e( 'Grup Adını Düzenle', 'kns-dynamic-discounts-for-woocommerce' ); ?></h3>
        <input type="text" id="knsdd-edit-group-name" />
        <input type="hidden" id="knsdd-old-group-name" />
        <div class="knsdd-modal-actions">
            <button class="button" id="knsdd-cancel-edit-group"><?php esc_html_e( 'İptal', 'kns-dynamic-discounts-for-woocommerce' ); ?></button>
            <button class="button button-primary" id="knsdd-save-group-name"><?php esc_html_e( 'Kaydet', 'kns-dynamic-discounts-for-woocommerce' ); ?></button>
        </div>
    </div>
</div>

<!-- Import Groups Modal -->
<div id="knsdd-import-groups-modal" class="knsdd-modal" style="display:none;" role="dialog" aria-modal="true" aria-labelledby="knsdd-import-modal-title" aria-describedby="knsdd-import-modal-desc">
    <div class="knsdd-modal-content knsdd-import-modal-content">
        <span class="knsdd-modal-close">&times;</span>
        <h3 id="knsdd-import-modal-title"><?php esc_html_e( 'Grupları İçe Aktar', 'kns-dynamic-discounts-for-woocommerce' ); ?></h3>
        
        <div class="knsdd-import-step" id="knsdd-import-step-upload">
            <p id="knsdd-import-modal-desc"><?php esc_html_e( 'JSON formatında dışa aktarılmış grup dosyasını seçin:', 'kns-dynamic-discounts-for-woocommerce' ); ?></p>
            <div class="knsdd-file-upload-area">
                <input type="file" id="knsdd-import-file" accept=".json" style="display: none;" />
                <div class="knsdd-file-drop-zone" id="knsdd-file-drop-zone">
                    <div class="knsdd-file-drop-content">
                        <span class="dashicons dashicons-upload"></span>
                        <p><?php esc_html_e( 'Dosyayı buraya sürükleyin veya tıklayarak seçin', 'kns-dynamic-discounts-for-woocommerce' ); ?></p>
                        <button type="button" class="button" id="knsdd-select-file-btn"><?php esc_html_e( 'Dosya Seç', 'kns-dynamic-discounts-for-woocommerce' ); ?></button>
                    </div>
                </div>
                <div class="knsdd-file-info" id="knsdd-file-info" style="display: none;">
                    <span class="knsdd-file-name"></span>
                    <span class="knsdd-file-size"></span>
                </div>
            </div>
        </div>
        
        <div class="knsdd-import-step" id="knsdd-import-step-validation" style="display: none;">
            <h4><?php esc_html_e( 'Doğrulama Raporu', 'kns-dynamic-discounts-for-woocommerce' ); ?></h4>
            <div class="knsdd-validation-summary" id="knsdd-validation-summary"></div>
            <div class="knsdd-validation-details" id="knsdd-validation-details"></div>
        </div>
        
        <div class="knsdd-import-step" id="knsdd-import-step-progress" style="display: none;">
            <h4><?php esc_html_e( 'İçe Aktarılıyor...', 'kns-dynamic-discounts-for-woocommerce' ); ?></h4>
            <div class="knsdd-progress-bar">
                <div class="knsdd-progress-fill" id="knsdd-import-progress-fill"></div>
            </div>
            <p class="knsdd-progress-text" id="knsdd-import-progress-text"><?php esc_html_e( 'Lütfen bekleyin...', 'kns-dynamic-discounts-for-woocommerce' ); ?></p>
        </div>
        
        <div class="knsdd-import-step" id="knsdd-import-step-complete" style="display: none;">
            <h4><?php esc_html_e( 'İçe Aktarma Tamamlandı', 'kns-dynamic-discounts-for-woocommerce' ); ?></h4>
            <div class="knsdd-import-results" id="knsdd-import-results"></div>
        </div>
        
        <div class="knsdd-modal-actions">
            <button class="button" id="knsdd-cancel-import"><?php esc_html_e( 'İptal', 'kns-dynamic-discounts-for-woocommerce' ); ?></button>
            <button class="button button-secondary" id="knsdd-dry-run-import" style="display: none;"><?php esc_html_e( 'Doğrula', 'kns-dynamic-discounts-for-woocommerce' ); ?></button>
            <button class="button button-primary" id="knsdd-apply-import" style="display: none;" disabled><?php esc_html_e( 'Uygula', 'kns-dynamic-discounts-for-woocommerce' ); ?></button>
        </div>
    </div>
</div>

<!-- Export Groups Modal -->
<div id="knsdd-export-modal" class="knsdd-modal" style="display:none;" role="dialog" aria-modal="true" aria-labelledby="knsdd-export-modal-title" aria-describedby="knsdd-export-modal-desc">
    <div class="knsdd-modal-content knsdd-export-modal-content">
        <span class="knsdd-modal-close">&times;</span>
        <h3 id="knsdd-export-modal-title"><?php esc_html_e( 'Grupları Dışa Aktar', 'kns-dynamic-discounts-for-woocommerce' ); ?></h3>

        <div class="knsdd-export-options" id="knsdd-export-modal-desc" aria-label="<?php echo esc_attr__( 'Dışa aktarma durum seçenekleri', 'kns-dynamic-discounts-for-woocommerce' ); ?>">
            <label><input type="checkbox" id="knsdd-export-status-all" value="all" checked> <?php esc_html_e( 'Tüm Gruplar', 'kns-dynamic-discounts-for-woocommerce' ); ?></label>
            <label><input type="checkbox" class="knsdd-export-status" value="open"> <?php esc_html_e( 'Aktif', 'kns-dynamic-discounts-for-woocommerce' ); ?></label>
            <label><input type="checkbox" class="knsdd-export-status" value="closed-pending"> <?php esc_html_e( 'Beklemede', 'kns-dynamic-discounts-for-woocommerce' ); ?></label>
            <label><input type="checkbox" class="knsdd-export-status" value="closed-expired"> <?php esc_html_e( 'Tamamlandı', 'kns-dynamic-discounts-for-woocommerce' ); ?></label>
            <label><input type="checkbox" class="knsdd-export-status" value="paused"> <?php esc_html_e( 'Manuel Pasif', 'kns-dynamic-discounts-for-woocommerce' ); ?></label>
            <label><input type="checkbox" class="knsdd-export-status" value="closed-incomplete"> <?php esc_html_e( 'Tarih Belirtilmedi', 'kns-dynamic-discounts-for-woocommerce' ); ?></label>
        </div>

        <div class="knsdd-modal-actions">
            <button class="button" id="knsdd-export-cancel"><?php esc_html_e( 'İptal', 'kns-dynamic-discounts-for-woocommerce' ); ?></button>
            <button class="button button-primary" id="knsdd-export-apply"><?php esc_html_e( 'Dışa Aktar', 'kns-dynamic-discounts-for-woocommerce' ); ?></button>
        </div>
    </div>
</div>
