@using Microsoft.Extensions.Localization
@using RomRepoMgr.Blazor.Resources
@implements IDialogContentComponent
@inject ILogger<ImportDats>            Logger
@inject IStringLocalizer<Localization> Localizer
@inject IConfiguration                 Configuration

<FluentDialog Width="800px" Height="400px" Title="Import DATs" Modal="true" TrapFocus="true">
    <FluentDialogBody>
        <div>
            <p hidden="@IsBusy">@string.Format(Localizer["DATs_will_be_imported_from"], path)</p>
            <FluentLabel Color="@StatusColor">@StatusMessage</FluentLabel>
            <FluentProgress Max="@ProgressMax" Min="@ProgressMin" Value="@ProgressValue" Visible="@ProgressVisible"/>
        </div>
        @if(Progress2Visible)
        {
            <div>
                <p>@StatusMessage2</p>
                <FluentProgress Max="@Progress2Max" Min="@Progress2Min" Value="@Progress2Value"/>
            </div>
        }
    </FluentDialogBody>
    <FluentDialogFooter>
        <FluentStack Orientation="Orientation.Horizontal">
            <FluentButton OnClick="@Start" Disabled="@IsBusy">@Localizer["Start"]</FluentButton>
            <FluentButton OnClick="@CloseAsync" Disabled="@CannotClose">@Localizer["Close"]</FluentButton>
        </FluentStack>
    </FluentDialogFooter>
</FluentDialog>