Option Strict On
Option Explicit On

Imports System
Imports System.Collections.Generic
Imports System.Collections.ObjectModel
Imports System.Globalization
Imports System.Windows.Forms
Imports Nexamas.UI.Architecture
Imports Nexamas.UI.Composition
Imports Nexamas.UI.Controls
Imports Nexamas.UI.General
Imports Nexamas.UI.Layout
Imports Nexamas.UI.Rendering
Imports Nexamas.UI.TextRendering
Imports Nexamas.UI.Theming
Imports Nexamas.UI.Values
Imports SkiaSharp

Namespace Nexamas.UI.Components

    Partial Public NotInheritable Class MASAgendaView

#Region "Rendering Footer"

        Private Sub DrawFooter(canvas As SKCanvas,
                               ctx As MASThemeContext,
                               content As SKRect,
                               dpi As Single,
                               isRtl As Boolean,
                               plan As MASAgendaViewLayoutPlan)
            If plan Is Nothing OrElse Not plan.ShowFooter Then Return
            Dim footer As New SKRect(content.Left, content.Bottom - plan.FooterHeightPx, content.Right, content.Bottom)
            Dim selected As AgendaEventState = GetSelectedEvent()
            Dim text As String = If(selected Is Nothing,
                                    SummaryText,
                                    SummaryText & " • Selected " & MASAgendaViewPolicy.BuildTimeText(selected.StartMinute, selected.EndMinute))
            TypographyTextPrimitives.DrawSingleLineText(canvas, ctx, text, footer, dpi, MASTypography.MASTextStyle.Micro, MASAgendaViewPolicy.ResolveMutedTextColor(ctx), If(isRtl, TypographyTextPrimitives.TextAlign.Right, TypographyTextPrimitives.TextAlign.Left), False)
        End Sub

#End Region

    End Class

End Namespace
