<?xml version="1.0" encoding="utf-8"?>
<Window
    x:Class="MBN_STOCK_WEBVIEW.LegacyParityApp.FirstRunSetupWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="V-STOCK 첫 실행 설정">

    <Grid Background="#FF08182B">
        <ScrollViewer>
            <StackPanel
                Width="720"
                Margin="36"
                HorizontalAlignment="Center"
                Spacing="20">

                <StackPanel Spacing="8">
                    <TextBlock
                        FontFamily="Segoe UI Variable Display"
                        FontSize="30"
                        FontWeight="SemiBold"
                        Foreground="White"
                        Text="첫 실행 설정" />
                    <TextBlock
                        FontSize="15"
                        Foreground="#FFBFD2E6"
                        Text="기존 코더의 Cuts 폴더와 Res 폴더를 선택하면 해당 경로만 저장합니다."
                        TextWrapping="Wrap" />
                </StackPanel>

                <Border
                    Padding="20"
                    Background="#FF102640"
                    BorderBrush="#334D79A7"
                    BorderThickness="1"
                    CornerRadius="14">
                    <StackPanel Spacing="12">
                        <TextBlock
                            FontSize="18"
                            FontWeight="SemiBold"
                            Foreground="White"
                            Text="1. Cuts 폴더" />
                        <TextBlock
                            x:Name="CutsPathText"
                            Foreground="#FFBFD2E6"
                            Text="선택되지 않음"
                            TextWrapping="Wrap" />
                        <Button
                            x:Name="ChooseCutsButton"
                            HorizontalAlignment="Left"
                            Click="OnChooseCutsClicked"
                            Content="Cuts 폴더 선택" />
                    </StackPanel>
                </Border>

                <Border
                    Padding="20"
                    Background="#FF102640"
                    BorderBrush="#334D79A7"
                    BorderThickness="1"
                    CornerRadius="14">
                    <StackPanel Spacing="12">
                        <TextBlock
                            FontSize="18"
                            FontWeight="SemiBold"
                            Foreground="White"
                            Text="2. 설정/INI 폴더 (Res)" />
                        <TextBlock
                            Foreground="#FF8FAAC5"
                            Text="폴더 안의 파일 전체를 검사하거나 복사하지 않고 선택한 경로를 그대로 사용합니다."
                            TextWrapping="Wrap" />
                        <TextBlock
                            x:Name="ResourcePathText"
                            Foreground="#FFBFD2E6"
                            Text="선택되지 않음"
                            TextWrapping="Wrap" />
                        <Button
                            x:Name="ChooseResourceButton"
                            HorizontalAlignment="Left"
                            Click="OnChooseResourceClicked"
                            Content="Res 폴더 선택" />
                    </StackPanel>
                </Border>

                <InfoBar
                    x:Name="SetupStatusBar"
                    IsClosable="False"
                    IsOpen="True"
                    Message="두 폴더를 선택해 주세요."
                    Severity="Informational"
                    Title="준비" />

                <ProgressBar
                    x:Name="SetupProgress"
                    Height="4"
                    IsIndeterminate="True"
                    Visibility="Collapsed" />

                <StackPanel
                    HorizontalAlignment="Right"
                    Orientation="Horizontal"
                    Spacing="10">
                    <Button
                        x:Name="CloseButton"
                        Click="OnCloseClicked"
                        Content="닫기"
                        Visibility="Collapsed" />
                    <Button
                        x:Name="InstallButton"
                        Click="OnInstallClicked"
                        Content="설정 시작"
                        IsEnabled="False"
                        Style="{StaticResource AccentButtonStyle}" />
                </StackPanel>

                <TextBlock
                    Foreground="#FF8FAAC5"
                    FontSize="13"
                    Text="설정 시작은 경로만 저장합니다. 빌드, DB, K3D 또는 Tornado2 작업은 실행하지 않으며 완료 후 Visual Studio에서 F5를 한 번 더 누르면 앱을 빌드해 시작합니다."
                    TextWrapping="Wrap" />
            </StackPanel>
        </ScrollViewer>
    </Grid>
</Window>
