<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:l="clr-namespace:Blahblah.FlowerApp"
    xmlns:ctl="clr-namespace:Blahblah.FlowerApp.Controls"
    xmlns:user="clr-namespace:Blahblah.FlowerApp.Views.User"
    xmlns:mdl="clr-namespace:Blahblah.FlowerApp.Data.Model"
    x:Class="Blahblah.FlowerApp.Views.User.LogItemPage"
    x:Name="logItemPage"
    x:DataType="mdl:LogItem"
    Title="{Binding Category}">

    <ScrollView>
        <Grid ColumnDefinitions="Auto,*" ColumnSpacing="12" Margin="20"
              RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto" RowSpacing="6">
            <ctl:SecondaryLabel Text="ID:"/>
            <Label Grid.Column="1" Text="{Binding Id}"/>

            <ctl:SecondaryLabel Grid.Row="1" Text="Time:"/>
            <Label Grid.Row="1" Grid.Column="1" Text="{Binding LogUnixTime, Converter={StaticResource dateTimeConverter}}"/>

            <ctl:SecondaryLabel Grid.Row="2" Text="Type:"/>
            <Label Grid.Row="2" Grid.Column="1" Text="{Binding LogType}"/>

            <ctl:SecondaryLabel Grid.Row="3" Text="Category:"/>
            <Label Grid.Row="3" Grid.Column="1" Text="{Binding Category}"/>

            <ctl:SecondaryLabel Grid.Row="4" Text="Source:"/>
            <Label Grid.Row="4" Grid.Column="1" Text="{Binding Source}"/>

            <ctl:SecondaryLabel Grid.Row="5" Text="Client agent:"/>
            <Label Grid.Row="5" Grid.Column="1" Text="{Binding ClientAgent}"/>

            <ctl:SecondaryLabel Grid.Row="6" Text="Message:" VerticalOptions="Start"/>
            <Label Grid.Row="6" Grid.Column="1" Text="{Binding Message}" LineBreakMode="WordWrap"/>

            <ctl:SecondaryLabel Grid.Row="7" Text="Description:" VerticalOptions="Start"/>
            <Label Grid.Row="7" Grid.Column="1" Text="{Binding Description}" LineBreakMode="WordWrap"/>
        </Grid>
    </ScrollView>

</ContentPage>