module Brillo.Data.FileDialog (
  FileDialog (..),
  SelectionMode (..),
)
where

import Data.Text (Text)


data SelectionMode
  = SingleFileSelect
  | MultiFileSelect
  | SingleDirectorySelect
  deriving (Int -> SelectionMode -> ShowS
[SelectionMode] -> ShowS
SelectionMode -> String
(Int -> SelectionMode -> ShowS)
-> (SelectionMode -> String)
-> ([SelectionMode] -> ShowS)
-> Show SelectionMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SelectionMode -> ShowS
showsPrec :: Int -> SelectionMode -> ShowS
$cshow :: SelectionMode -> String
show :: SelectionMode -> String
$cshowList :: [SelectionMode] -> ShowS
showList :: [SelectionMode] -> ShowS
Show, SelectionMode -> SelectionMode -> Bool
(SelectionMode -> SelectionMode -> Bool)
-> (SelectionMode -> SelectionMode -> Bool) -> Eq SelectionMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SelectionMode -> SelectionMode -> Bool
== :: SelectionMode -> SelectionMode -> Bool
$c/= :: SelectionMode -> SelectionMode -> Bool
/= :: SelectionMode -> SelectionMode -> Bool
Eq)


{-| The 'FileDialog' represents a dialog
| that can be opened by the user to select files or directories.
-}
data FileDialog
  = FileDialog
  { FileDialog -> Text
title :: !Text
  -- ^ Title of the dialog
  , FileDialog -> Text
defaultPath :: !Text
  -- ^ Default path to open the dialog at
  , FileDialog -> [Text]
filterPatterns :: ![Text]
  -- ^ Filter patterns like `["*.jpg", "*.png"]`
  , FileDialog -> Text
filterDescription :: !Text
  -- ^ Filter description like `"text files"`
  , FileDialog -> SelectionMode
selectionMode :: !SelectionMode
  -- ^ Single or multiple selections
  }
  deriving (Int -> FileDialog -> ShowS
[FileDialog] -> ShowS
FileDialog -> String
(Int -> FileDialog -> ShowS)
-> (FileDialog -> String)
-> ([FileDialog] -> ShowS)
-> Show FileDialog
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FileDialog -> ShowS
showsPrec :: Int -> FileDialog -> ShowS
$cshow :: FileDialog -> String
show :: FileDialog -> String
$cshowList :: [FileDialog] -> ShowS
showList :: [FileDialog] -> ShowS
Show, FileDialog -> FileDialog -> Bool
(FileDialog -> FileDialog -> Bool)
-> (FileDialog -> FileDialog -> Bool) -> Eq FileDialog
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FileDialog -> FileDialog -> Bool
== :: FileDialog -> FileDialog -> Bool
$c/= :: FileDialog -> FileDialog -> Bool
/= :: FileDialog -> FileDialog -> Bool
Eq)