<?php
/**
 * Account profile tab template
 *
 * @link       https://yourwebsite.com
 * @since      1.0.0
 *
 * @package    Subscription_System
 * @subpackage Subscription_System/public/partials/account-tabs
 */
?>

<div class="account-tab-content">
    <h2>Edit Profile</h2>
    
    <div class="subscription-system-message-container"></div>
    
    <div class="profile-section">
        <h3 class="section-title">Personal Information</h3>
        
        <form id="edit-profile-form" class="subscription-system-form">
            <div class="form-row">
                <div class="two-columns">
                    <div class="form-group">
                        <label for="first_name">First Name</label>
                        <input type="text" id="first_name" name="first_name" class="form-control" value="<?php echo esc_attr($first_name); ?>">
                    </div>
                    
                    <div class="form-group">
                        <label for="last_name">Last Name</label>
                        <input type="text" id="last_name" name="last_name" class="form-control" value="<?php echo esc_attr($last_name); ?>">
                    </div>
                </div>
            </div>
            
            <div class="form-row">
                <div class="form-group">
                    <label for="email">Email Address</label>
                    <input type="email" id="email" name="email" class="form-control" value="<?php echo esc_attr($email); ?>">
                </div>
            </div>
            
            <div class="form-row">
                <div class="form-group">
                    <button type="submit" class="subscription-system-submit-btn">Update Profile</button>
                </div>
            </div>
            
            <?php wp_nonce_field('update_profile_nonce', 'update_profile_nonce'); ?>
            <input type="hidden" name="action_type" value="update_profile">
        </form>
    </div>
    
    <div class="profile-section password-section">
        <h3 class="section-title">Change Password</h3>
        
        <form id="change-password-form" class="subscription-system-form">
            <div class="form-row">
                <div class="form-group">
                    <label for="password_current_password">Current Password</label>
                    <div class="password-field-container">
                        <input type="password" id="password_current_password" name="current_password" class="form-control">
                        <span class="password-toggle" data-target="password_current_password">👁️</span>
                    </div>
                </div>
            </div>
            
            <div class="form-row">
                <div class="form-group">
                    <label for="new_password">New Password</label>
                    <div class="password-field-container">
                        <input type="password" id="new_password" name="new_password" class="form-control">
                        <span class="password-toggle" data-target="new_password">👁️</span>
                    </div>
                    <div class="password-strength-meter">
                        <div class="strength-bar"></div>
                        <span class="strength-text">Password strength</span>
                    </div>
                </div>
            </div>
            
            <div class="form-row">
                <div class="form-group">
                    <label for="confirm_password">Confirm New Password</label>
                    <div class="password-field-container">
                        <input type="password" id="confirm_password" name="confirm_password" class="form-control">
                        <span class="password-toggle" data-target="confirm_password">👁️</span>
                    </div>
                </div>
            </div>
            
            <div class="form-row">
                <div class="form-group">
                    <button type="submit" class="subscription-system-submit-btn">Change Password</button>
                </div>
            </div>
            
            <?php wp_nonce_field('update_profile_nonce', 'update_profile_nonce'); ?>
            <input type="hidden" name="action_type" value="change_password">
        </form>
    </div>
</div> 