Option Strict On
Option Explicit On

Imports SkiaSharp

Namespace Nexamas.UI.Composition

    ''' <summary>
    ''' Assembly-internal compatibility layout measurement contract for controls that still expose a logical preferred/minimum size to Composition.
    ''' MASSize intrinsic facts are the primary measurement source; Composition may consult this participant only as a guarded fallback.
    ''' This contract is intentionally Friend-only; external consumers must use MASSize/MASLayout public gateways, not this fallback surface.
    ''' Implementations must not mutate BoundsLogical, ControlsLayer, host, theme, input, scroll, overlay state, or retained layout state.
    ''' </summary>
    <Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Advanced)>
    Friend Interface IMASLayoutParticipant

        ''' <summary>
        ''' Returns the preferred logical size for Composition Auto/Preferred fallback measurement.
        ''' The implementation must be side-effect free and must remain consistent with the control's IMASIntrinsicSizeContract.
        ''' </summary>
        Function GetPreferredLayoutSize(context As MASLayoutMeasureContext) As SKSize

        ''' <summary>
        ''' Returns the minimum logical size for Composition fallback min/clamp logic.
        ''' The implementation must be side-effect free and must remain consistent with the control's IMASIntrinsicSizeContract.
        ''' </summary>
        Function GetMinLayoutSize(context As MASLayoutMeasureContext) As SKSize

    End Interface

End Namespace
