{-# LANGUAGE TemplateHaskell #-}
module Eventlog.Javascript
  (
    vegaLite
  , vegaEmbed
  , vega
  , jquery
  , bootstrap
  , bootstrapCSS
  , fancytable
  , sparkline

  , datatables
  , datatablesHtml5
  , datatablesButtons
  , datatablesEllipsis
  , datatablesCSS
  , datatablesButtonsCSS
  , imagesCSS

  , stylesheet
  , tablogic
  , treevega
  ) where

import Data.Text
import Data.Text.Encoding
import Data.FileEmbed
import Eventlog.AssetVersions

vegaLite :: Text
vegaLite :: Text
vegaLite = ByteString -> Text
decodeUtf8 $(embedFile ("javascript/generated/vega-lite@" ++ vegaLiteVersion))

vegaEmbed :: Text
vegaEmbed :: Text
vegaEmbed = ByteString -> Text
decodeUtf8 $(embedFile ("javascript/generated/vega-embed@" ++ vegaEmbedVersion))

vega :: Text
vega :: Text
vega = ByteString -> Text
decodeUtf8 $(embedFile ("javascript/generated/vega@" ++ vegaVersion))

jquery :: Text
jquery :: Text
jquery = ByteString -> Text
decodeUtf8 $(embedFile ("javascript/generated/jquery-" ++ jqueryVersion ++ ".min.js"))

datatables :: Text
datatables :: Text
datatables = ByteString -> Text
decodeUtf8 $(embedFile ("javascript/generated/jquery.dataTables.min.js"))

datatablesButtons :: Text
datatablesButtons :: Text
datatablesButtons = ByteString -> Text
decodeUtf8 $(embedFile ("javascript/generated/dataTables.buttons.min.js"))

datatablesHtml5 :: Text
datatablesHtml5 :: Text
datatablesHtml5 = ByteString -> Text
decodeUtf8 $(embedFile ("javascript/generated/buttons.html5.min.js"))

datatablesCSS :: Text
datatablesCSS :: Text
datatablesCSS =  ByteString -> Text
decodeUtf8 $(embedFile ("javascript/generated/jquery.dataTables.min.css"))

datatablesButtonsCSS :: Text
datatablesButtonsCSS :: Text
datatablesButtonsCSS =  ByteString -> Text
decodeUtf8 $(embedFile ("javascript/generated/buttons.dataTables.min.css"))

datatablesEllipsis :: Text
datatablesEllipsis :: Text
datatablesEllipsis =  ByteString -> Text
decodeUtf8 $(embedFile ("javascript/ellipsis.js"))

imagesCSS :: Text
imagesCSS :: Text
imagesCSS =  ByteString -> Text
decodeUtf8 $(embedFile ("javascript/generated/overide_images.css"))

bootstrap :: Text
bootstrap :: Text
bootstrap = ByteString -> Text
decodeUtf8 $(embedFile ("javascript/generated/bootstrap.min.js"))

bootstrapCSS :: Text
bootstrapCSS :: Text
bootstrapCSS = ByteString -> Text
decodeUtf8 $(embedFile ("javascript/generated/bootstrap.min.css"))

fancytable :: Text
fancytable :: Text
fancytable = ByteString -> Text
decodeUtf8 $(embedFile ("javascript/generated/fancyTable.min.js"))

sparkline :: Text
sparkline :: Text
sparkline = ByteString -> Text
decodeUtf8 $(embedFile ("javascript/generated/jquery.sparkline.min.js"))

stylesheet :: Text
stylesheet :: Text
stylesheet = ByteString -> Text
decodeUtf8 $(embedFile "javascript/stylesheet.css")

tablogic :: Text
tablogic :: Text
tablogic = ByteString -> Text
decodeUtf8 $(embedFile "javascript/tablogic.js")

treevega :: Text
treevega :: Text
treevega = ByteString -> Text
decodeUtf8 $(embedFile "javascript/ccmap.vg")