module BtcLsp.Yesod.Data.BootstrapColor
  ( BootstrapColor (..),
    bsColor2Class,
  )
where

import BtcLsp.Yesod.Import.NoFoundation

data BootstrapColor
  = Success
  | Info
  | Warning
  | Danger
  deriving stock
    ( Int -> BootstrapColor -> ShowS
[BootstrapColor] -> ShowS
BootstrapColor -> [Char]
(Int -> BootstrapColor -> ShowS)
-> (BootstrapColor -> [Char])
-> ([BootstrapColor] -> ShowS)
-> Show BootstrapColor
forall a.
(Int -> a -> ShowS) -> (a -> [Char]) -> ([a] -> ShowS) -> Show a
showList :: [BootstrapColor] -> ShowS
$cshowList :: [BootstrapColor] -> ShowS
show :: BootstrapColor -> [Char]
$cshow :: BootstrapColor -> [Char]
showsPrec :: Int -> BootstrapColor -> ShowS
$cshowsPrec :: Int -> BootstrapColor -> ShowS
Show,
      ReadPrec [BootstrapColor]
ReadPrec BootstrapColor
Int -> ReadS BootstrapColor
ReadS [BootstrapColor]
(Int -> ReadS BootstrapColor)
-> ReadS [BootstrapColor]
-> ReadPrec BootstrapColor
-> ReadPrec [BootstrapColor]
-> Read BootstrapColor
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BootstrapColor]
$creadListPrec :: ReadPrec [BootstrapColor]
readPrec :: ReadPrec BootstrapColor
$creadPrec :: ReadPrec BootstrapColor
readList :: ReadS [BootstrapColor]
$creadList :: ReadS [BootstrapColor]
readsPrec :: Int -> ReadS BootstrapColor
$creadsPrec :: Int -> ReadS BootstrapColor
Read,
      BootstrapColor -> BootstrapColor -> Bool
(BootstrapColor -> BootstrapColor -> Bool)
-> (BootstrapColor -> BootstrapColor -> Bool) -> Eq BootstrapColor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BootstrapColor -> BootstrapColor -> Bool
$c/= :: BootstrapColor -> BootstrapColor -> Bool
== :: BootstrapColor -> BootstrapColor -> Bool
$c== :: BootstrapColor -> BootstrapColor -> Bool
Eq
    )

bsColor2Class :: BootstrapColor -> Text
bsColor2Class :: BootstrapColor -> Text
bsColor2Class =
  [Char] -> Text
forall seq. IsSequence seq => [Element seq] -> seq
pack ([Char] -> Text)
-> (BootstrapColor -> [Char]) -> BootstrapColor -> Text
forall {k} (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. ShowS
forall t. Textual t => t -> t
toLower ShowS -> (BootstrapColor -> [Char]) -> BootstrapColor -> [Char]
forall {k} (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. BootstrapColor -> [Char]
forall a. Show a => a -> [Char]
show