<Window
  x:Class="VPet.ModMaker.Views.ModEdit.ClickTextEdit.ClickTextEditWindow"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
  xmlns:local="clr-namespace:VPet.ModMaker.Views.ModEdit.ClickTextEdit"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:pu="https://opensource.panuon.com/wpf-ui"
  xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.ClickTextEdit"
  Title="{ll:Str 编辑点击文本}"
  Width="800"
  Height="450"
  d:DataContext="{d:DesignInstance Type=vm:ClickTextEditWindowVM}"
  WindowStartupLocation="CenterScreen"
  mc:Ignorable="d">
  <Grid>
    <Grid.ColumnDefinitions>
      <ColumnDefinition MinWidth="300" />
      <ColumnDefinition Width="Auto" MinWidth="300" />
      <ColumnDefinition Width="Auto" />
    </Grid.ColumnDefinitions>
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition />
      </Grid.RowDefinitions>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto" />
          <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Label Content="Id" />
        <TextBox
          Grid.Column="1"
          pu:TextBoxHelper.Watermark="Id"
          Style="{StaticResource TextBox_Wrap}"
          Text="{Binding ClickText.Value.Id.Value, UpdateSourceTrigger=PropertyChanged}"
          TextWrapping="Wrap" />
      </Grid>
      <TextBox
        x:Name="TextBox_Text"
        Grid.Row="1"
        d:Text="这是一个测试文本,这是一个测试文本,这是一个测试文本,这是一个测试文本,这是一个测试文本,这是一个测试文本,这是一个测试文本,"
        pu:TextBoxHelper.Watermark="{ll:Str 文本}"
        Style="{StaticResource TextBox_Wrap}"
        Text="{Binding ClickText.Value.CurrentI18nData.Value.Text.Value, UpdateSourceTrigger=PropertyChanged}" />
    </Grid>
    <Grid Grid.Column="1">
      <Grid.RowDefinitions>
        <RowDefinition />
        <RowDefinition Height="Auto" />
      </Grid.RowDefinitions>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto" />
          <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto" />
          <RowDefinition Height="Auto" />
          <RowDefinition Height="Auto" />
          <RowDefinition Height="Auto" />
          <RowDefinition Height="Auto" />
          <RowDefinition Height="Auto" />
          <RowDefinition />
        </Grid.RowDefinitions>
        <Label Content="{ll:Str 指定工作}" />
        <TextBox
          Grid.Column="1"
          pu:TextBoxHelper.Watermark="{ll:Str 非必要}"
          Text="{Binding ClickText.Value.Working.Value, UpdateSourceTrigger=PropertyChanged}" />
        <Label Grid.Row="3" Content="{ll:Str 宠物状态}" />
        <Grid Grid.Row="3" Grid.Column="1">
          <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
          </Grid.ColumnDefinitions>
          <TextBlock Text="{Binding ClickText.Value.Mode.EnumValue.Value}" />
          <ComboBox
            x:Name="ComboBox_Mode"
            Grid.Column="1"
            ItemsSource="{Binding ClickText.Value.ModeTypes}"
            SelectedIndex="0" />
          <Button
            Grid.Column="2"
            Command="{Binding ClickText.Value.Mode.AddCommand}"
            CommandParameter="{Binding SelectedItem, ElementName=ComboBox_Mode}"
            Content="+" />
          <Button
            Grid.Column="3"
            Command="{Binding ClickText.Value.Mode.RemoveCommand}"
            CommandParameter="{Binding SelectedItem, ElementName=ComboBox_Mode}"
            Content="-" />
        </Grid>
        <Label Grid.Row="4" Content="{ll:Str 行动状态}" />
        <ComboBox
          Grid.Row="4"
          Grid.Column="1"
          ItemsSource="{Binding ClickText.Value.WorkingStates}"
          SelectedItem="{Binding ClickText.Value.WorkingState.Value}" />
        <Label Grid.Row="5" Content="{ll:Str 日期区间}" />
        <Grid Grid.Row="5" Grid.Column="1">
          <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
          </Grid.ColumnDefinitions>
          <TextBlock Text="{Binding ClickText.Value.DayTime.EnumValue.Value}" />
          <ComboBox
            x:Name="ComboBox_DayTime"
            Grid.Column="1"
            ItemsSource="{Binding ClickText.Value.DayTimes}"
            SelectedIndex="0" />
          <Button
            Grid.Column="2"
            Command="{Binding ClickText.Value.DayTime.AddCommand}"
            CommandParameter="{Binding SelectedItem, ElementName=ComboBox_DayTime}"
            Content="+" />
          <Button
            Grid.Column="3"
            Command="{Binding ClickText.Value.DayTime.RemoveCommand}"
            CommandParameter="{Binding SelectedItem, ElementName=ComboBox_DayTime}"
            Content="-" />
        </Grid>
        <ListBox Grid.Row="6" Grid.ColumnSpan="2">
          <ListBoxItem
            DataContext="{Binding ClickText.Value.Like}"
            Tag="{ll:Str 好感度范围}"
            Template="{StaticResource ListBoxItem_RangeData}" />
          <ListBoxItem
            DataContext="{Binding ClickText.Value.Health}"
            Tag="{ll:Str 健康度范围}"
            Template="{StaticResource ListBoxItem_RangeData}" />
          <ListBoxItem
            DataContext="{Binding ClickText.Value.Level}"
            Tag="{ll:Str 等级范围}"
            Template="{StaticResource ListBoxItem_RangeData}" />
          <ListBoxItem
            DataContext="{Binding ClickText.Value.Money}"
            Tag="{ll:Str 金钱范围}"
            Template="{StaticResource ListBoxItem_RangeData}" />
          <ListBoxItem
            DataContext="{Binding ClickText.Value.Food}"
            Tag="{ll:Str 食物范围}"
            Template="{StaticResource ListBoxItem_RangeData}" />
          <ListBoxItem
            DataContext="{Binding ClickText.Value.Drink}"
            Tag="{ll:Str 口渴范围}"
            Template="{StaticResource ListBoxItem_RangeData}" />
          <ListBoxItem
            DataContext="{Binding ClickText.Value.Feel}"
            Tag="{ll:Str 心情范围}"
            Template="{StaticResource ListBoxItem_RangeData}" />
          <ListBoxItem
            DataContext="{Binding ClickText.Value.Strength}"
            Tag="{ll:Str 体力范围}"
            Template="{StaticResource ListBoxItem_RangeData}" />
        </ListBox>
      </Grid>
      <Grid Grid.Row="1">
        <Grid.ColumnDefinitions>
          <ColumnDefinition />
          <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Button
          x:Name="Button_Cancel"
          Margin="10"
          Click="Button_Cancel_Click"
          Content="{ll:Str 取消}" />
        <Button
          x:Name="Button_Yes"
          Grid.Column="1"
          Margin="10"
          Click="Button_Yes_Click"
          Content="{ll:Str 确定}" />
      </Grid>
    </Grid>
    <ListBox Grid.Column="2" Template="{StaticResource ListBox_ShowLangs}" />
  </Grid>
</Window>
