<UserControl x:Class="ClaudeDo.Installer.Pages.WelcomePage.WelcomePageView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:ClaudeDo.Installer.Pages.WelcomePage"
             xmlns:loc="clr-namespace:ClaudeDo.Installer.Localization"
             d:DataContext="{d:DesignInstance local:WelcomePageViewModel}"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d">

    <ScrollViewer VerticalScrollBarVisibility="Auto">
        <StackPanel MaxWidth="520">

            <TextBlock Text="{Binding Heading}" FontSize="20" FontWeight="SemiBold" Margin="0,0,0,6"/>
            <TextBlock Text="{Binding Subheading}" TextWrapping="Wrap"
                       Foreground="{StaticResource TextSecondaryBrush}" Margin="0,0,0,24"/>

            <Label Content="{loc:Tr installer.welcome.installDirectory}"/>
            <Grid Margin="0,0,0,4">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <TextBox Grid.Column="0"
                         Text="{Binding InstallDirectory, UpdateSourceTrigger=PropertyChanged}"
                         IsEnabled="{Binding InstallDirEditable}"/>
                <Button Grid.Column="1"
                        Content="{loc:Tr installer.nav.browse}"
                        Margin="8,0,0,0"
                        Command="{Binding BrowseInstallCommand}"
                        IsEnabled="{Binding InstallDirEditable}"/>
            </Grid>
            <TextBlock Text="{Binding InstallError}" Foreground="{StaticResource ErrorBrush}" FontSize="11"
                       Visibility="{Binding InstallError, Converter={StaticResource NullToCollapsedConverter}}"/>

            <CheckBox Content="{loc:Tr installer.welcome.registerMcp}"
                      IsChecked="{Binding RegisterMcp}"
                      Margin="0,24,0,0"/>
            <TextBlock Text="{loc:Tr installer.welcome.registerMcpHint}"
                       TextWrapping="Wrap" FontSize="11"
                       Foreground="{StaticResource TextSecondaryBrush}"
                       Margin="0,4,0,0"/>

        </StackPanel>
    </ScrollViewer>
</UserControl>
