@using CouchLog.Data

<MudCard Style="max-width: 500px; background-color: #2a2a2a; color: white;" Elevation="4">
    <MudCardContent Class="pa-0">
        <MudGrid Spacing="0">
            <!-- Poster Image -->
            <MudItem xs="4">
                <MudImage 
                    Src="@PrivateEntity.GlobalEntity.PicturePath" 
                    Alt=""
                    ObjectFit="ObjectFit.Cover"
                    Style="width: 100%; height: 100%; min-height: 180px; border-radius: 4px 0 0 4px;" />
            </MudItem>

            <!-- Content -->
            <MudItem xs="8">
                <MudStack Class="pa-3" Spacing="2">
                    <!-- Title Row with Menu -->
                    <MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
                        <MudText Typo="Typo.h6" Style="color: white; font-weight: 600;">@PrivateEntity.GlobalEntity.Title</MudText>
                        <MudMenu Icon="@Icons.Material.Filled.MoreVert" Color="Color.Default" Dense="true">
                            <MudMenuItem>Bearbeiten</MudMenuItem>
                            <MudMenuItem>Entfernen</MudMenuItem>
                        </MudMenu>
                    </MudStack>

                    <!-- Date -->
                    <!-- <MudText Typo="Typo.caption" Style="color: #aaaaaa;">@Date.ToString("MM/dd/yyyy")</MudText> -->

                    <!-- Status Dropdown -->
                    <MudSelect 
                        T="string" 
                        @bind-Value="@PrivateEntity.UserWatchStatus!.Name"
                        Dense="true"
                        Variant="Variant.Outlined"
                        Style="background-color: #3a3a3a; color: white;"
                        Label="">
                        <!--@foreach (var status in )
                        {
                            <MudSelectItem Value="@status">@status</MudSelectItem>
                        }-->
                    </MudSelect>

                    <!-- Season Dropdown -->
                    <MudSelect 
                        T="int?" 
                        @bind-Value="@PrivateEntity.Season"
                        Dense="true"
                        Variant="Variant.Outlined"
                        Style="background-color: #3a3a3a; color: white;"
                        Label="">
                        <!-- @foreach (var season in SeasonOptions)
                        {
                            <MudSelectItem Value="@season">@season</MudSelectItem>
                        }-->
                    </MudSelect>

                    <!-- Episode Dropdown -->
                    <MudSelect 
                        T="int?" 
                        @bind-Value="@PrivateEntity.Episode"
                        Dense="true"
                        Variant="Variant.Outlined"
                        Style="background-color: #3a3a3a; color: white;"
                        Label="">
                        <!--@foreach (var episode in EpisodeOptions)
                        {
                            <MudSelectItem Value="@episode">@episode</MudSelectItem>
                        }-->
                    </MudSelect>

                    <!-- Details Button -->
                    <MudStack Row="true" Justify="Justify.FlexEnd">
                        <MudButton 
                            Variant="Variant.Outlined" 
                            Size="Size.Small"
                            Style="color: #aaaaaa; border-color: #555555;">
                            Details
                        </MudButton>
                    </MudStack>
                </MudStack>
            </MudItem>
        </MudGrid>
    </MudCardContent>
</MudCard>

@code
{
    [Parameter] public PrivateEntity PrivateEntity { get; set; } = null!;
    [Parameter] public List<UserWatchStatus> UserWatchStatuses { get; set; } = null!;
}
