module Matterhorn.Events.DeleteChannelConfirm where

import           Prelude ()
import           Matterhorn.Prelude

import qualified Graphics.Vty as Vty

import           Matterhorn.Types
import           Matterhorn.State.Channels


onEventDeleteChannelConfirm :: Vty.Event -> MH ()
onEventDeleteChannelConfirm :: Event -> MH ()
onEventDeleteChannelConfirm (Vty.EvKey Key
k []) = do
    case Key
k of
        Vty.KChar Char
c | Char
c Char -> [Char] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
`elem` ([Char]
"yY"::String) ->
            MH ()
deleteCurrentChannel
        Key
_ -> () -> MH ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
    Mode -> MH ()
setMode Mode
Main
onEventDeleteChannelConfirm Event
_ = do
    Mode -> MH ()
setMode Mode
Main