<?php
    if ( ! defined( 'ABSPATH' ) ) exit;
?>
<div class="cloud-s3-admin-page" id="conf-page-cloud-s3">
    <div class="container">
        <?php include 'cloud-s3-sidebar.php'; ?>
        <div class="content">
            <div class="wrap">
                <h1>Cloud S3 Storage MIME Types</h1>
                <form method="post" action="">
                    <?php wp_nonce_field('save_cloud_s3_mime_types', 'cloud_s3_mime_types_nonce'); ?>

                    <h3><?php echo esc_html__('Select the MIME types to enable:', 'cloud-s3-storage'); ?></h3>
                    <div class="mime-types-grid">
                        <?php foreach ($available_mime_types as $mime): ?>
                            <?php $checked = in_array($mime, $selected_mime_types) ? 'checked' : ''; ?>
                            <label>
                                <input type="checkbox" name="cloud_s3_mime_types[]" value="<?php echo esc_attr($mime); ?>" <?php echo esc_attr($checked); ?>> 
                                <?php echo esc_html($mime); ?>
                            </label>
                        <?php endforeach; ?>
                    </div>

                    <input type="submit" value="<?php echo esc_attr__('Save settings', 'cloud-s3-storage'); ?>" class="button button-primary">
                </form>
            </div>
        </div>
    </div>
</div>