<Window x:Class="Nodify.Calculator.CreateModelDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Create New Model"
        Width="500"
        Height="420"
        WindowStartupLocation="CenterOwner"
        ResizeMode="NoResize"
        Background="#2D2D30"
        Foreground="White">
    <Grid Margin="15">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <!-- Model/Class Name -->
        <TextBlock Text="Model / Class Name:" Grid.Row="0" Margin="0 0 0 4" />
        <TextBox x:Name="ModelNameBox" Grid.Row="1" Margin="0 0 0 10"
                 Background="#3E3E42" Foreground="White" Padding="4" />

        <!-- Properties -->
        <StackPanel Orientation="Horizontal" Grid.Row="2" Margin="0 0 0 4">
            <TextBlock Text="Properties:" FontWeight="Bold" />
            <Button Content="➕ Add" Margin="10 0 0 0" Padding="8 2" Click="AddProperty_Click"
                    Background="#3E3E42" Foreground="White" Cursor="Hand" />
        </StackPanel>
        <DataGrid x:Name="PropertiesGrid" Grid.Row="3" Margin="0 0 0 10"
                  AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="True"
                  Background="#3E3E42" Foreground="White" RowBackground="#3E3E42"
                  AlternatingRowBackground="#333337" GridLinesVisibility="None"
                  HeadersVisibility="Column" BorderBrush="#555">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="*" />
                <DataGridComboBoxColumn Header="Type" SelectedItemBinding="{Binding Type}" Width="120">
                    <DataGridComboBoxColumn.ItemsSource>
                        <x:Array Type="sys:String" xmlns:sys="clr-namespace:System;assembly=System.Runtime">
                            <sys:String>string</sys:String>
                            <sys:String>int</sys:String>
                            <sys:String>double</sys:String>
                            <sys:String>bool</sys:String>
                            <sys:String>float</sys:String>
                            <sys:String>decimal</sys:String>
                            <sys:String>long</sys:String>
                            <sys:String>DateTime</sys:String>
                            <sys:String>object</sys:String>
                            <sys:String>List&lt;string&gt;</sys:String>
                            <sys:String>List&lt;int&gt;</sys:String>
                            <sys:String>List&lt;object&gt;</sys:String>
                        </x:Array>
                    </DataGridComboBoxColumn.ItemsSource>
                </DataGridComboBoxColumn>
            </DataGrid.Columns>
        </DataGrid>

        <!-- Buttons -->
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="4">
            <Button Content="Create" Width="80" Margin="0 0 10 0" Padding="4"
                    Click="OnCreateClick" IsDefault="True" />
            <Button Content="Cancel" Width="80" Padding="4"
                    Click="OnCancelClick" IsCancel="True" />
        </StackPanel>
    </Grid>
</Window>
