{-# LANGUAGE OverloadedStrings #-} module Matterhorn.Draw.DeleteChannelConfirm ( drawDeleteChannelConfirm ) where import Prelude () import Matterhorn.Prelude import Brick import Brick.Widgets.Border import Brick.Widgets.Center import Matterhorn.Themes import Matterhorn.Types drawDeleteChannelConfirm :: ChatState -> Widget Name drawDeleteChannelConfirm :: ChatState -> Widget Name drawDeleteChannelConfirm ChatState st = let cName :: Text cName = ChatState stChatState -> Getting Text ChatState Text -> Text forall s a. s -> Getting a s a -> a ^.(ClientChannel -> Const Text ClientChannel) -> ChatState -> Const Text ChatState Lens' ChatState ClientChannel csCurrentChannel((ClientChannel -> Const Text ClientChannel) -> ChatState -> Const Text ChatState) -> ((Text -> Const Text Text) -> ClientChannel -> Const Text ClientChannel) -> Getting Text ChatState Text forall b c a. (b -> c) -> (a -> b) -> a -> c .(ChannelInfo -> Const Text ChannelInfo) -> ClientChannel -> Const Text ClientChannel Lens' ClientChannel ChannelInfo ccInfo((ChannelInfo -> Const Text ChannelInfo) -> ClientChannel -> Const Text ClientChannel) -> ((Text -> Const Text Text) -> ChannelInfo -> Const Text ChannelInfo) -> (Text -> Const Text Text) -> ClientChannel -> Const Text ClientChannel forall b c a. (b -> c) -> (a -> b) -> a -> c .(Text -> Const Text Text) -> ChannelInfo -> Const Text ChannelInfo Lens' ChannelInfo Text cdName in Widget Name -> Widget Name forall n. Widget n -> Widget n centerLayer (Widget Name -> Widget Name) -> Widget Name -> Widget Name forall a b. (a -> b) -> a -> b $ Int -> Widget Name -> Widget Name forall n. Int -> Widget n -> Widget n hLimit Int 50 (Widget Name -> Widget Name) -> Widget Name -> Widget Name forall a b. (a -> b) -> a -> b $ Int -> Widget Name -> Widget Name forall n. Int -> Widget n -> Widget n vLimit Int 15 (Widget Name -> Widget Name) -> Widget Name -> Widget Name forall a b. (a -> b) -> a -> b $ AttrName -> Widget Name -> Widget Name forall n. AttrName -> Widget n -> Widget n withDefAttr AttrName dialogAttr (Widget Name -> Widget Name) -> Widget Name -> Widget Name forall a b. (a -> b) -> a -> b $ Widget Name -> Widget Name -> Widget Name forall n. Widget n -> Widget n -> Widget n borderWithLabel (Text -> Widget Name forall n. Text -> Widget n txt Text "Confirm Delete Channel") (Widget Name -> Widget Name) -> Widget Name -> Widget Name forall a b. (a -> b) -> a -> b $ [Widget Name] -> Widget Name forall n. [Widget n] -> Widget n vBox [ Padding -> Widget Name -> Widget Name forall n. Padding -> Widget n -> Widget n padBottom (Int -> Padding Pad Int 1) (Widget Name -> Widget Name) -> Widget Name -> Widget Name forall a b. (a -> b) -> a -> b $ Widget Name -> Widget Name forall n. Widget n -> Widget n hCenter (Widget Name -> Widget Name) -> Widget Name -> Widget Name forall a b. (a -> b) -> a -> b $ Text -> Widget Name forall n. Text -> Widget n txt Text "Are you sure you want to delete this channel?" , Padding -> Widget Name -> Widget Name forall n. Padding -> Widget n -> Widget n padBottom (Int -> Padding Pad Int 1) (Widget Name -> Widget Name) -> Widget Name -> Widget Name forall a b. (a -> b) -> a -> b $ Widget Name -> Widget Name forall n. Widget n -> Widget n hCenter (Widget Name -> Widget Name) -> Widget Name -> Widget Name forall a b. (a -> b) -> a -> b $ AttrName -> Widget Name -> Widget Name forall n. AttrName -> Widget n -> Widget n withDefAttr AttrName dialogEmphAttr (Widget Name -> Widget Name) -> Widget Name -> Widget Name forall a b. (a -> b) -> a -> b $ Text -> Widget Name forall n. Text -> Widget n txt Text cName , Widget Name -> Widget Name forall n. Widget n -> Widget n hCenter (Widget Name -> Widget Name) -> Widget Name -> Widget Name forall a b. (a -> b) -> a -> b $ Text -> Widget Name forall n. Text -> Widget n txt Text "Press " Widget Name -> Widget Name -> Widget Name forall n. Widget n -> Widget n -> Widget n <+> (AttrName -> Widget Name -> Widget Name forall n. AttrName -> Widget n -> Widget n withDefAttr AttrName dialogEmphAttr (Widget Name -> Widget Name) -> Widget Name -> Widget Name forall a b. (a -> b) -> a -> b $ Text -> Widget Name forall n. Text -> Widget n txt Text "Y") Widget Name -> Widget Name -> Widget Name forall n. Widget n -> Widget n -> Widget n <+> Text -> Widget Name forall n. Text -> Widget n txt Text " to delete the channel" , Widget Name -> Widget Name forall n. Widget n -> Widget n hCenter (Widget Name -> Widget Name) -> Widget Name -> Widget Name forall a b. (a -> b) -> a -> b $ Text -> Widget Name forall n. Text -> Widget n txt Text "or any other key to cancel." ]