'use client' import { Cloud } from 'lucide-react' import { useEffect, useState } from 'react' import { useAuth } from '../lib/auth/hooks' import { usePropertyStore } from '../lib/properties/store' import { ProfileDropdown } from './profile-dropdown' import { PropertyDropdown } from './property-dropdown' import { SignInDialog } from './sign-in-dialog' /** * CloudSaveButton - Shows authentication state and property management * * Not authenticated: Shows "Save to cloud" button * Authenticated: Shows PropertyDropdown and ProfileDropdown */ export function CloudSaveButton() { const { isAuthenticated, isLoading } = useAuth() const [isSignInDialogOpen, setIsSignInDialogOpen] = useState(false) const initialize = usePropertyStore(state => state.initialize) // Initialize property store when authenticated useEffect(() => { if (isAuthenticated) { initialize() } }, [isAuthenticated, initialize]) if (isLoading) { return (