Option Strict On
Option Explicit On

Imports System
Imports System.Collections.Generic
Imports System.Windows.Forms
Imports Nexamas.UI.Components
Imports Nexamas.UI.General
Imports Nexamas.UI.Rendering
Imports Nexamas.UI.Scroll
Imports Nexamas.UI.SkiaScroll
Imports Nexamas.UI.Theming
Imports Nexamas.UI.Layout
Imports SkiaSharp

Namespace Nexamas.UI.FloatRuntime

    Partial Friend NotInheritable Class MASMessageBoxFloatContent
#Region "Size/Layout Surface Contract"

        Private Function MeasureFloatSurface(context As MASSizeContext,
                                             availableSize As SKSize,
                                             intent As MASSize) As MASSizeResult _
            Implements IMASFloatSurfaceSizeContract.MeasureFloatSurface

            Return MASFloatSurfaceSizeResolver.ResolveStandardSurface(
                kind:=MASFloatSurfaceKind.MessageBox,
                context:=context,
                availableSize:=availableSize,
                intent:=MASSize.Normalize(intent))
        End Function

#End Region

#Region "Input Policy"

        Public ReadOnly Property AcceptsPointerInput As Boolean Implements IMASFloatInputPolicy.AcceptsPointerInput
            Get
                Return True
            End Get
        End Property

        Public ReadOnly Property AcceptsKeyboardInput As Boolean Implements IMASFloatInputPolicy.AcceptsKeyboardInput
            Get
                Return True
            End Get
        End Property

        Public ReadOnly Property AcceptsTextInput As Boolean Implements IMASFloatInputPolicy.AcceptsTextInput
            Get
                Return False
            End Get
        End Property

        Public ReadOnly Property CloseOnOutsidePointer As Boolean Implements IMASFloatInputPolicy.CloseOnOutsidePointer
            Get
                Return _request.AllowBackdropDismiss
            End Get
        End Property

        Public ReadOnly Property SwallowOutsidePointer As Boolean Implements IMASFloatInputPolicy.SwallowOutsidePointer
            Get
                Return True
            End Get
        End Property

        Public ReadOnly Property CloseOnEscape As Boolean Implements IMASFloatInputPolicy.CloseOnEscape
            Get
                Return False
            End Get
        End Property

#End Region
    End Class

End Namespace
