Option Strict On
Option Explicit On

Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Threading
Imports System.Threading.Tasks

Imports Nexamas.UI.Architecture
Imports Nexamas.UI.Composition
Imports Nexamas.UI.Controls
Imports Nexamas.UI.FileSystem
Imports Nexamas.UI.General
Imports Nexamas.UI.Icons
Imports Nexamas.UI.Layout
Imports Nexamas.UI.Platform
Imports Nexamas.UI.Theming
Imports Nexamas.UI.Values

Imports SkiaSharp

Namespace Nexamas.UI.Components


    Partial Friend NotInheritable Class MASFileBrowser
#Region "Public API"

        Friend Sub SetBounds(bounds As SKRect)
            SetBounds(bounds.Left, bounds.Top, bounds.Width, bounds.Height)
        End Sub

        Friend Sub SetBounds(x As Single,
                             y As Single,
                             width As Single,
                             height As Single)

             SetLocalLayoutBoundsInternal(New SKRect(
                x,
                y,
                x + Math.Max(0.0F, width),
                y + Math.Max(0.0F, height)
            ))
        End Sub

        Friend Function WithBounds(bounds As SKRect) As MASFileBrowser
            SetBounds(bounds)
            Return Me
        End Function

        Friend Function WithBounds(x As Single,
                                   y As Single,
                                   width As Single,
                                   height As Single) As MASFileBrowser

            SetBounds(x, y, width, height)
            Return Me
        End Function

        Friend Function WithCurrentPath(value As String) As MASFileBrowser
            CurrentPath = value
            Return Me
        End Function

        Friend Function WithFilter(value As String) As MASFileBrowser
            Filter = value
            Return Me
        End Function

        Friend Function WithShowHidden(Optional value As Boolean = True) As MASFileBrowser
            ShowHidden = value
            Return Me
        End Function

        Friend Function WithMultiSelect(Optional value As Boolean = True) As MASFileBrowser
            AllowMultiSelect = value
            Return Me
        End Function

#End Region


    End Class

End Namespace
