<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <OutputType>WinExe</OutputType>
        <TargetFramework>net7.0</TargetFramework>
        <!--Avalonia doesen't support TrimMode=link currently,but we are working on that https://github.com/AvaloniaUI/Avalonia/issues/6892 -->
        <TrimMode>copyused</TrimMode>
        <BuiltInComInteropSupport>true</BuiltInComInteropSupport>
        <AssemblyName>OneBella</AssemblyName>
        <RootNamespace>OneBella</RootNamespace>
    </PropertyGroup>
    <PropertyGroup>
        <CFBundleName>OneBella</CFBundleName> <!-- Also defines .app file name -->
        <CFBundleDisplayName>OneBella</CFBundleDisplayName>
        <CFBundleIdentifier>com.fint.onebella</CFBundleIdentifier>
        <CFBundleVersion>1.0.0</CFBundleVersion>
        <CFBundlePackageType>APPL</CFBundlePackageType>
        <CFBundleShortVersionString>OneBella 1.0+</CFBundleShortVersionString>
        <CFBundleSignature>com.fint.onebella</CFBundleSignature>
        <CFBundleExecutable>OneBella</CFBundleExecutable>
        <CFBundleIconFile>Resources/ldb.icns</CFBundleIconFile>
        <ApplicationIcon>Resources\ldb.ico</ApplicationIcon> <!-- Will be copied from output directory -->
        <!--        <NSPrincipalClass>NSApplication</NSPrincipalClass>-->
        <!--        <NSHighResolutionCapable>true</NSHighResolutionCapable>-->
    </PropertyGroup>
    <ItemGroup>
        <Compile Include="Infra\Log.fs" />
        <Compile Include="Infra\Utils.fs" />
        <Compile Include="Infra\Res.fs" />
    </ItemGroup>
    <ItemGroup>
        <Compile Include="Core\ConnectionParameters.fs" />
        <Compile Include="Core\DbUtils.fs" />
        <Compile Include="Core\BVal.fs" />
    </ItemGroup>
    <ItemGroup>
        <Compile Include="UseCases\RunSql.fs" />
        <Compile Include="UseCases\UpdateField.fs" />
        <Compile Include="UseCases\StoredConn.fs" />
    </ItemGroup>

    <ItemGroup>
        <Compile Include="Repo\Repo.fs" />
        <AvaloniaResource Include="Assets\**" />
        <Content Include="OneBella.entitlements" />
        <EmbeddedResource Include="Resources\json.xshd" />
        <EmbeddedResource Include="Resources\sql.xshd" />
        <AvaloniaResource Include="Resources\Styles.xaml" />
        <AvaloniaResource Include="Resources\Resources.xaml" />
        <None Include="Resources\ldb.icns">
          <CopyToOutputDirectory>Always</CopyToOutputDirectory>
        </None>
        <Content Include="Resources\ldb.ico" />
        <None Remove=".gitignore" />
        <Compile Include="ViewModels\ViewModelBase.fs" />
        <Compile Include="ViewModels\BsonItem.fs" />
        <Compile Include="ViewModels\DbAction.fs" />
        <Compile Include="ViewModels\DbItem.fs" />
        <Compile Include="ViewModels\DbFileItem.fs" />
        <Compile Include="ViewModels\PagingViewModel.fs" />
        <Compile Include="ViewModels\ScriptViewModel.fs" />
        <Compile Include="ViewModels\ConnectionItem.fs" />
        <Compile Include="ViewModels\ConnectionViewModel.fs" />
        <Compile Include="ViewModels\MainWindowViewModel.fs" />
        <Compile Include="ViewModels\ValueTemplateSelector.fs" />
        <Compile Include="ViewModels\DbItemTemplateSelector.fs" />
       
        <Compile Include="Views\ConnectionControl.axaml.fs" />
        <Compile Include="Views\AddConnectionWindow.axaml.fs" />
        <Compile Include="Views\CharFoldingStrategy.fs" />
        <Compile Include="Views\ScriptControl.axaml.fs" />
        <Compile Include="Views\SqlTextEditor.axaml.fs" />
        <Compile Include="Views\JsonTextEditor.axaml.fs" />
        <Compile Include="Views\MainWindow.axaml.fs" />
        <Compile Include="App.axaml.fs" />
        <Compile Include="Program.fs" />
        <Content Include="..\README.md">
          <Link>README.md</Link>
        </Content>
        <Content Include="..\LICENSE">
          <Link>LICENSE</Link>
        </Content>

    </ItemGroup>
    <ItemGroup>
        <!--This helps with theme dll-s trimming.
        If you will publish your application in self-contained mode with p:PublishTrimmed=true and it will use Fluent theme Default theme will be trimmed from the output and vice versa.
        https://github.com/AvaloniaUI/Avalonia/issues/5593 -->
        <TrimmableAssembly Include="Avalonia.Themes.Fluent" />
        <TrimmableAssembly Include="Avalonia.Themes.Default" />
    </ItemGroup>
    <ItemGroup>
        <PackageReference Include="Avalonia" Version="0.10.18" />
        <PackageReference Include="Avalonia.AvaloniaEdit" Version="0.10.12.2" />
        <PackageReference Include="Avalonia.Controls.DataGrid" Version="0.10.18" />
        <PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="0.10.18.1" />
        <PackageReference Include="Avalonia.Desktop" Version="0.10.18" />
        <!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
        <PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="0.10.18" />
        <PackageReference Include="Avalonia.ReactiveUI" Version="0.10.18" />
        <PackageReference Include="DotNet.Bundle" Version="0.9.13" />
        <PackageReference Include="LiteDB" Version="5.0.15" />
    </ItemGroup>
   
</Project>
