module Matterhorn.Draw.MessageDeleteConfirm
  ( drawMessageDeleteConfirm
  )
where

import Prelude ()
import Matterhorn.Prelude

import           Brick
import           Brick.Widgets.Border
import           Brick.Widgets.Center
import qualified Data.Text as T

import           Matterhorn.Types
import           Matterhorn.Themes


drawMessageDeleteConfirm :: Widget Name
drawMessageDeleteConfirm :: Widget Name
drawMessageDeleteConfirm =
    let msg :: Text
msg = Text
"Are you sure you want to delete the selected message? (y/n)"
    in forall n. Widget n -> Widget n
centerLayer forall a b. (a -> b) -> a -> b
$
       forall n. Widget n -> Widget n -> Widget n
borderWithLabel (forall n. AttrName -> Widget n -> Widget n
withAttr AttrName
channelListHeaderAttr forall a b. (a -> b) -> a -> b
$ forall n. Text -> Widget n
txt Text
"Confirm") forall a b. (a -> b) -> a -> b
$
       forall n. Int -> Widget n -> Widget n
hLimit (Text -> Int
T.length Text
msg forall a. Num a => a -> a -> a
+ Int
4) forall a b. (a -> b) -> a -> b
$
       forall n. Int -> Widget n -> Widget n
vLimit Int
3 forall a b. (a -> b) -> a -> b
$
       forall n. Widget n -> Widget n
center forall a b. (a -> b) -> a -> b
$
       forall n. AttrName -> Widget n -> Widget n
withDefAttr AttrName
errorMessageAttr forall a b. (a -> b) -> a -> b
$
       forall n. Text -> Widget n
txt Text
msg