/** * ds-user-settings.js * User settings page component * Manages user profile, preferences, integrations, and account settings * MVP3: Full integration with backend API and user-store */ import { useUserStore } from '../../stores/user-store.js'; export default class DSUserSettings extends HTMLElement { constructor() { super(); this.userStore = useUserStore(); this.activeTab = 'profile'; this.isLoading = false; this.formChanges = {}; } connectedCallback() { this.render(); this.setupEventListeners(); this.subscribeToUserStore(); } subscribeToUserStore() { this.unsubscribe = this.userStore.subscribe(() => { this.updateUI(); }); } render() { const user = this.userStore.getCurrentUser(); const displayName = this.userStore.getDisplayName(); const avatar = this.userStore.getAvatar(); this.innerHTML = `
${user?.email || 'Not logged in'}