<?xml version="1.0" encoding="utf-8" ?>
<toolkit:Popup
    x:Class="SeriesTracker.Controls.CustomPopUp.DeleteAlert"
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
    x:Name="this"
    Color="Transparent">
    <StackLayout>
        <Border
            Margin="20,25,20,25"
            Padding="10"
            BackgroundColor="{AppThemeBinding Light={StaticResource LightPopUpBackground},
                                              Dark={StaticResource DarkPopUpBackground}}"
            Stroke="Transparent">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="45" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="40" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Label
                    x:Name="TitleLabel"
                    Grid.Row="0"
                    Grid.ColumnSpan="2"
                    Margin="10"
                    FontAttributes="Bold"
                    FontSize="18"
                    HorizontalOptions="StartAndExpand"
                    LineBreakMode="TailTruncation"
                    MaxLines="2"
                    Text="{Binding Source={x:Reference this}, Path=Title}"
                    TextColor="{AppThemeBinding Light={StaticResource Primary},
                                                Dark={StaticResource PrimaryDark}}" />
                <Image
                    Grid.Row="1"
                    Grid.Column="0"
                    HeightRequest="22"
                    HorizontalOptions="Center"
                    Source="delete.png"
                    WidthRequest="22">
                    <Image.Behaviors>
                        <toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource Gray600}, Dark={StaticResource Gray300}}" />
                    </Image.Behaviors>
                </Image>
                <Label
                    x:Name="DeleteButton"
                    Grid.Row="1"
                    Grid.Column="1"
                    BackgroundColor="Transparent"
                    FontFamily="NunitoItalic"
                    FontSize="16"
                    HorizontalOptions="FillAndExpand"
                    HorizontalTextAlignment="Start"
                    Text="Вы точно хотите удалить данный сериал?"
                    TextColor="{AppThemeBinding Light={StaticResource Gray950},
                                                Dark={StaticResource Gray200}}"
                    VerticalTextAlignment="Center" />
                <HorizontalStackLayout
                    Grid.Row="2"
                    Grid.ColumnSpan="2"
                    HorizontalOptions="End">
                    <Button
                        x:Name="deny"
                        BackgroundColor="Transparent"
                        Clicked="deny_Clicked"
                        FontAttributes="Bold"
                        FontSize="14"
                        Text="Отмена"
                        TextColor="{StaticResource Gray500}" />
                    <Button
                        x:Name="confirm"
                        BackgroundColor="Transparent"
                        Clicked="confirm_Clicked"
                        FontAttributes="Bold"
                        FontSize="14"
                        Text="Удалить"
                        TextColor="{StaticResource Red}" />
                </HorizontalStackLayout>
            </Grid>
            <Border.StrokeShape>
                <RoundRectangle CornerRadius="10" />
            </Border.StrokeShape>
        </Border>
    </StackLayout>
</toolkit:Popup>
