{-# LANGUAGE DataKinds #-}
{-# LANGUAGE LambdaCase #-}

module Cardano.CLI.EraBased.Commands.TextView
  ( TextViewCmds (..)
  , renderTextViewCmds
  )
where

import           Cardano.Api.Shelley

import           Data.Text (Text)

data TextViewCmds era
  = TextViewInfo
      !FilePath
      (Maybe (File () Out))
  deriving Int -> TextViewCmds era -> ShowS
[TextViewCmds era] -> ShowS
TextViewCmds era -> String
(Int -> TextViewCmds era -> ShowS)
-> (TextViewCmds era -> String)
-> ([TextViewCmds era] -> ShowS)
-> Show (TextViewCmds era)
forall era. Int -> TextViewCmds era -> ShowS
forall era. [TextViewCmds era] -> ShowS
forall era. TextViewCmds era -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall era. Int -> TextViewCmds era -> ShowS
showsPrec :: Int -> TextViewCmds era -> ShowS
$cshow :: forall era. TextViewCmds era -> String
show :: TextViewCmds era -> String
$cshowList :: forall era. [TextViewCmds era] -> ShowS
showList :: [TextViewCmds era] -> ShowS
Show

renderTextViewCmds :: TextViewCmds era -> Text
renderTextViewCmds :: forall era. TextViewCmds era -> Text
renderTextViewCmds = \case
  TextViewInfo String
_ Maybe (File () 'Out)
_ -> Text
"text-view decode-cbor"