<div class="wrap chainpay-admin">
    <h1>Edit License</h1>
    
    <form method="post" action="">
        <?php wp_nonce_field('chainpay_license_edit_' . $license->id); ?>
        
        <table class="form-table">
            <tr><th>License Key</th><td><code><?php echo esc_html($license->license_key); ?></code></td></tr>
            <tr>
                <th><label for="email">Email</label></th>
                <td><input type="email" name="email" id="email" class="regular-text" value="<?php echo esc_attr($license->user_email); ?>" required></td>
            </tr>
            <tr>
                <th><label for="domain">Domain</label></th>
                <td><input type="text" name="domain" id="domain" class="regular-text" value="<?php echo esc_attr($license->user_domain); ?>"></td>
            </tr>
            <tr>
                <th><label for="status">Status</label></th>
                <td>
                    <select name="status" id="status">
                        <option value="active" <?php selected($license->status, 'active'); ?>>Active</option>
                        <option value="inactive" <?php selected($license->status, 'inactive'); ?>>Inactive</option>
                        <option value="expired" <?php selected($license->status, 'expired'); ?>>Expired</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th><label for="expiration_date">Expiration Date</label></th>
                <td><input type="datetime-local" name="expiration_date" id="expiration_date" class="regular-text" value="<?php echo esc_attr(str_replace(' ', 'T', $license->expiration_date)); ?>"></td>
            </tr>
        </table>
        
        <p class="submit">
            <input type="submit" name="update_license" class="button button-primary" value="Update License">
        </p>
    </form>
</div>
