<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:ClaudeDo.Ui.ViewModels.Modals"
        xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
        xmlns:loc="using:ClaudeDo.Ui.Localization"
        x:Class="ClaudeDo.Ui.Views.Modals.UnfinishedPlanningModalView"
        x:DataType="vm:UnfinishedPlanningModalViewModel"
        Title="{loc:Tr modals.unfinishedPlanning.windowTitle}"
        Width="440" Height="200"
        CanResize="False"
        WindowDecorations="None"
        ExtendClientAreaToDecorationsHint="True"
        WindowStartupLocation="CenterOwner"
        Background="{DynamicResource SurfaceBrush}">

  <Window.KeyBindings>
    <KeyBinding Gesture="Escape" Command="{Binding CancelCommand}"/>
  </Window.KeyBindings>

  <ctl:ModalShell Title="{loc:Tr modals.unfinishedPlanning.title}" CloseCommand="{Binding CancelCommand}">
    <ctl:ModalShell.Footer>
      <StackPanel Orientation="Horizontal" Spacing="8"
                  HorizontalAlignment="Right" VerticalAlignment="Center">
        <Button Classes="btn" Content="{loc:Tr modals.unfinishedPlanning.discard}"  Command="{Binding DiscardCommand}"     MinWidth="80"/>
        <Button Classes="btn" Content="{loc:Tr modals.unfinishedPlanning.finalize}" Command="{Binding FinalizeNowCommand}" MinWidth="80"/>
        <Button Content="{loc:Tr modals.unfinishedPlanning.resume}"   Command="{Binding ResumeCommand}"      Classes="primary" MinWidth="80"/>
      </StackPanel>
    </ctl:ModalShell.Footer>

    <!-- Body -->
    <StackPanel Margin="20,16" Spacing="8">
      <TextBlock Classes="title" Text="{Binding TaskTitle}"
                 TextTrimming="CharacterEllipsis"/>
      <TextBlock Classes="body">
        <Run Text="{Binding DraftCount}"/>
        <Run Text="{loc:Tr modals.unfinishedPlanning.draftTasksSuffix}"/>
      </TextBlock>
    </StackPanel>

  </ctl:ModalShell>
</Window>
